| Author |
Add testSuites to other test suites?
|
Ryan Day
Ranch Hand
Joined: Apr 03, 2006
Posts: 87
|
|
I'm getting an error when I try to create a top-level Junit test suite that will call multiple other test suites. I am trying to create a JUnit test suite "AllTests" that contains all of the TestSuites in other packages. The lower-level AllTests looks like this (with package and class names changed to samples): Here is the higher level test suite I created: The low level test suites run fine, but when I try to run the higher level test suite, I get the following error:
junit.framework.AssertionFailedError: No tests found in com.sample.business.AllTests
|
SCJP, SCWCD
|
 |
Rodrigo Lopes
Ranch Hand
Joined: Feb 29, 2008
Posts: 118
|
|
One guess: com.sample.business.AllTests has to extend TestSuite [ June 05, 2008: Message edited by: Rodrigo Lopes ]
|
 |
Ryan Day
Ranch Hand
Joined: Apr 03, 2006
Posts: 87
|
|
>>One guess: com.sample.business.AllTests has to extend TestSuite Tried this. Still no luck.
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
In the higher level suite, you need to add "AllTests.suite()" and not "AllTests.class".
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
Ryan Day
Ranch Hand
Joined: Apr 03, 2006
Posts: 87
|
|
Thank you both for your help. Here is the working "suite of suites": [ June 06, 2008: Message edited by: Ryan Day ]
|
 |
 |
|
|
subject: Add testSuites to other test suites?
|
|
|