... In my corrent codebase I could think of something like this: Some of our tests use a class "PersistentTestSupport", that helps in setting up tests that use...
... Just skimmed through two of my OS projects. 80% of the test cases refer to a single class under test. For about 20% of those CUTs I have more than one test...
... I am sure that you guys spent a lot of time debating this point back in the day, but I would like to point out that this is one of the hidden drawbacks of...
Pigneri, Rocco
rpigneri@...
Nov 19, 2009 5:45 pm
22067
I need some way to run a certain test after all other tests. I run my tests in Eclipse, and do not yet have a build system outside of it. I understand that had...
Well, of course the feature already has my vote ;), but in terms of concrete code, sure. I have an DAOBase for the general persistence classes, and then...
Cedric, That is what you get out of @BeforeClass and @AfterClass when you define them on the class with the @RunWith(Suite.class) annotation. It is the same...
... No, as wrappers of an entire test suite: BeforeSuite BeforeClass ... AfterClass BeforeClass AfterClass ... AfterSuite -- ***Cédric * [Non-text portions of...
I agree with Georg. I prefer an annotation where I can specify the subcategories where a test fits. Something like: @Category( "database.mysql.local" ) public...
All, I can see that a short code snippet has been misleading about what our proposal makes easy, possible, and impossible. I'll try to post a longer feature...
Folks, thanks for your answers. ... Could you tell me directly, or point to some resource, of how I set that up? Your sentence didn't immediately ring...
Stolsvik, What you want (annotate some random class somewhere) isn't currently supported by JUnit (as far as I know). But what you can do is make a suite. So...
... Some (many) people have asked for categories as a way of running only some of their tests, and our primary goal is to help them. If you were ever tempted...
I have a question about the options for gathering and displaying supplemental information about test failures. Please allow me to illustrate my question with a...
Have you looked at how eclipse handles AssertEquals of two Strings. Not sure if this is a JUnit core functionality or not. But eclipse highlights how the two...
Dear Sunburned, If I write assertEquals("(1,-1,0)", point.toString()); and change the toString method, I get this (slightly garbled, but mostly helpful)...
Mike, I've never seen it. I am interested, but ultimately we are looking for a solution that will work outside of Eclipse. We are working on an open source ...
You might consider extending/changing/refactoring JUnit itself using github. There you can fork JUnit itself and submit your idea for inclusion for everyone....
Big Mike, Thanks for the info. I don't know that the system I have in mind will require any tweaks to JUnit. I think all of my code can run along side of it,...
David, In this particular case your technique would work. I wonder, when testing return values that are slightly more complicated, if this would start to fall...
Landon, Definitely take a close look at the failure messages from the standard assert methods, and also the assertThat method added in 4.4. Good luck, David...
Hi David, Did you gave thoughs to cases where one would like to exclude certain tests? E.g.: run all tests that are not in (a) certain category(s)? This is...
Sorry! The URL is http://github.com/KentBeck/junit/issues/#issue/37 (can the issue number change? I have memories of this being number 41). The title is:...
... For what it's worth, excluding tests is a very popular TestNG features. For example, I use it when a few tests are broken and need to remain so for a ...
... Georg, We came very close to adding an ExcludeCategories annotation. However, we decided to stay at a minimal feature set for Categories in the initial...
... For this particular use case, I've found @Ignore generally useful. I also really love Kevin Lawrence's idea of marking tests with bug numbers. He does it...