Re: nunit improvement
"Charlie Poole" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <00e001c8aa1e$f055e140$6401a8c0@ferrari> |
Hi, I'm copying this to the user list, since we are getting into some things of general interst. That's actually the best place to ask questions because (1) other people can answer (I might be on vacation and (2) other people can benefit. You asked why the tests were green even though the fixture is red - Well, the tests all ran successfully and passed individually. The error occured in TestFixtureTearDown, which is not part of any of the test cases. TestFixtureTearDown is not considered part of the test. The idea is that TestFixtureTearDown should be able to successfully run in all cases. If you look closely, you will see that your fixture shows an error, not a failure. The difference is subtle, but see how the message shows an unexpected exception (NUnit.Framework.AssertionException). In normal failures, only the message is shown. You can continue to do this, so long as you understand how to interpret the result. In the next release, I'm trying to show such errors more clearly. Up to now, all releases of NUnit have only counted test cases errors in reporting results. Alternatively, you may be able to put your check in a TearDown method, which is repeated for each test and results in the individual test failing, or in the test methods themselves. Of course, this means you would need to setup and delete your application for each test and that may not be what you want to do. Regarding your suggestion that old results in the tree be kept across runs, it makes sense to me. Would you put it in as a feature request on SourceForge, please? Charlie _____ From: PIN Yannick [mailto:[email protected]] Sent: Tuesday, April 29, 2008 2:21 AM To: Charlie Poole Subject: RE: nunit improvement Hello, Thank you again. Im sorry to disturb you again. I hope that it is the last time :-) In fact you are all right. I verify the test and there is an assertion inside the [TestFixtureTearDown]: Assert.AreEqual(oldFree, newFree); at the end of the test, I want to delete application and I want to verify memory recovery. The way that is used today is in the testfixtureteardown (delete appli, logoff, and verify memory). Is there another way to generate an error in case of bad memory recovery after the deletion, than use an assertion that seems to cause problem ? Moreover, I have another question. Is it possible to click on the button run without deleting the status of test already run (color), and deleting only the status of tests that will be run ? I try several options (uncheck the option clear results when reloading, activate save visual state of each project (but it is not convenient for performance purpose)), but the colors are always lost. The purpose is to be able to avoid to run the whole campaign in one step but run the whole campaign or a subset in several time and being able to save the status obtained in xml file. I dont manage too see in the source code where the clean of the color of the treeview is done. Thank a lot. Regards. PIN Yannick Validation team Gemalto Tel: +33 4 42 36 30 62 Fax: +33 4 42 36 58 09 Avenue du Jujubier, ZI Athélia IV BP90 13702 La CIOTAT [email protected] <http://www.gemalto.com> www.gemalto.com _____ From: Charlie Poole [mailto:[email protected]] Sent: lundi 28 avril 2008 19:47 To: PIN Yannick Subject: RE: nunit improvement Hi Pin, Glad that helped. Rearding the color, I meant to ask about the properties of the suite that is red. However, the message behind the properties display seems to give the answer. You appear to have placed an Assert in the TestFixtureTearDown method of TestGSCIS. This causes an error in the teardown, after all the tests have run. It's generally not useful to put an Assert in TestFixtureSetUp or TestFixtureTearDown fjor this reason. Charlie _____ From: PIN Yannick [mailto:[email protected]] Sent: Monday, April 28, 2008 8:59 AM To: Charlie Poole Subject: RE: nunit improvement Hello, Thank you very much for your fast response. According to your answer in fact, I have found the corresponding option. It solve my issue for the loading of the campaign. For the properties of the test, see attached file. In fact, I though it was a color bug of the tools but I notice a wrong comparison behind (errors and failure tab) Perhaps it is the reason but I do not understand why the test himself is not red. Thank you very much for your support. Regards. PIN Yannick Validation team Gemalto Tel: +33 4 42 36 30 62 Fax: +33 4 42 36 58 09 Avenue du Jujubier, ZI Athélia IV BP90 13702 La CIOTAT [email protected] <http://www.gemalto.com> www.gemalto.com _____ From: Charlie Poole [mailto:[email protected]] Sent: lundi 28 avril 2008 16:50 To: PIN Yannick Subject: RE: nunit improvement Hi Yannick, I'll take a look at how that can be made more efficient but you can always turn it off in the options. Regarding the red suite with green tests, this is actually valid in some circumstances. What do the properties for that suite indicate? Charlie _____ From: PIN Yannick [mailto:[email protected]] Sent: Monday, April 28, 2008 3:06 AM To: [email protected] Subject: nunit improvement Hello, I have a performance issue with nunit 2.4.7. I have a big campaign. In fact, when you start nunit, it read a file (x_visual_state.xml) that is very large (3 Mo) and because of that, the loading duration is about 15 minutes. When I modify the file TestSuitetreeview.cs by adding a Boolean firstLoad to avoid the first load, the performance is ok (about 20s to start NUnit). Perhaps an improvement can be done in the xml file (not store all campaign status but only open item) ? Moreover, I have a color bug. All tests are green in a directory, but the parent directory is red. The same problem exists in 2.0 version so it is an very old one. <<TestSuiteTreeView.cs>> But in fact, it is a good tool. Congratulation for it :-):-) I hope that my remarks can improve the tool. Regards. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users