This is mainly for my own reference but if it helps people out there great! The documentation on this aspect of JUnit is very poor.
package agalliao.wealthManagment.domain;
import org.junit.runner.RunWith;import org.junit.runners.Suite;
@RunWith(Suite.class)@Suite.SuiteClasses({ investmentTests.class, catalogTests.class, markerTests.class })public class AllTests { // why on earth I need this class, I have no idea! }
About Joe Ocampo
My personal philosophy is simple:
"Have a good strategy that sets the environment for success through the enablement of the whole.
Be agile but with a mind towards pragmatism.
Delegate to the best qualified individuals, but don’t be afraid to involve yourself in all parts of a job.
Treat everyone with respect, humility, and with a genuine pursuit towards excellence."
Respected business and technical leader with expertise in directing organization towards effective results driven outcomes. Proven ability to perform and communicate from both technical and business perspectives. Strong technical and business acumen developed through experience, education and training. Provides the ability to utilize technology, harness business intelligence and execute strategically by optimizing systems, tools and process.
Passionate about building people, companies and software by containing cost, maximizing operational throughput and capitalize on revenue. Looks to leverage the strengths of individuals and grow the organization to their maximum potential by harnessing the power of their collective whole and deliver results.
Co-Founder of LosTechies.com
This entry was posted in
Java,
JUnit. Bookmark the
permalink. Follow any comments here with the
RSS feed for this post.
what a lifesaver!!!! Thanks!!
yay, thanks!
re “why on earth I need this class, I have no idea! “, you may have tierUp/Down methods or whatever in that class like I have. For example if you need to prepare database or a container…
Thanks!!!!
Re: “Why on earth …”
I think, something is needed that can be annotated.
see
http://junit.org/junit/javadoc/4.5/org/junit/runner/RunWith.html
Thanks Joe, that was really helpful (right on top in google search results)
re “why on earth I need this class, I have no idea! ” (apart from what Aleks wrote)…
You need that declaration in order to keep this class definition in a way that compiles
Anyway, thanks for a publishing that tip! You saved my time
ty a lot!! This is what I was looking for!!
Thanks very much. I really needed this.
AND, the junit documentation should be updated with something
like what you provided.
I’m nearly in tears it’s so beatiful. I have been looking for a way to create good looking test suites in java for over 6 hours now and then I find this.
thank you very much, you have done everyone a huge favor.
Thanks!!! you’ve made my day.
bingo. Thanks.
Indeed, useful! Thanks.
Jaroslaw Dobrzanski
Thanks for the explanation regarding the comment.
Indeed, useful! Thanks.
Jaroslaw Dobrzanski
Thanks for the explanation regarding the comment.
Indeed, useful! Thanks.
Jaroslaw Dobrzanski
Thanks for the explanation regarding the comment.
Hi, thank you too. This is really missing on the Internet
The class is needed so that you can add @BeforeClass methods that initialize all other test cases in this suite. It breaks independence but it’s a life saver when you need it.
Finally working code. I was stuck on things like
TestSuite suite = new TestSuite(“Test for tests”);
suite.add(NOTHING WORKS AAAHHHHH);
Very Usefull
Thx
Thanks a lot man!
thank you. just what I was looking for. saved hours of research.
nice write up.
Consultants available for Software testing, Test Management requirements. reach us at Testing-Associates
Thank you very much! You’re right, there’s no documentation for this.
I’ll add my voice to the thank yous. Short and sweet.
Thank you, my master:)
This is all cool and all, but how do you run it? I’m using eclipse, but the IDE isn’t key.
Mahalo!
i m thankful