• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Add testSuites to other test suites?

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Ranch Hand
Posts: 121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One guess:

com.sample.business.AllTests has to extend TestSuite
[ June 05, 2008: Message edited by: Rodrigo Lopes ]
 
Ryan Day
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
>>One guess: com.sample.business.AllTests has to extend TestSuite

Tried this. Still no luck.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the higher level suite, you need to add "AllTests.suite()" and not "AllTests.class".
 
Ryan Day
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you both for your help. Here is the working "suite of suites":


[ June 06, 2008: Message edited by: Ryan Day ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic