tag:blogger.com,1999:blog-7530218802939252476.post4288619699713549307..comments2024-02-01T04:14:23.366-06:00Comments on novyden: Enhancing JUnit Suites with Categories to eliminate test-suite dependencyGregory Kanevskyhttp://www.blogger.com/profile/09179130896383881927noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7530218802939252476.post-61764279664524032632012-01-22T18:24:43.160-06:002012-01-22T18:24:43.160-06:00Do you have at least single test marked with categ...Do you have at least single test marked with category BotTest? <br /><br />@Category({BotTest.class})<br />public class SomeOfMyTests {<br /><br />@Test public void testSomething() {<br />....<br />}<br /><br />}Gregory Kanevskyhttps://www.blogger.com/profile/09179130896383881927noreply@blogger.comtag:blogger.com,1999:blog-7530218802939252476.post-53771726186164085422011-12-13T16:48:19.990-06:002011-12-13T16:48:19.990-06:00I'm trying to get this working and something i...I'm trying to get this working and something is wrong... I keep getting the following trace:<br /><br /><br />java.lang.Exception: Custom runner class Categories should have a public constructor with signature Categories(Class testClass)<br /> at org.junit.internal.runners.InitializationError.(InitializationError.java:19)<br /> at org.junit.internal.requests.ClassRequest.buildRunner(ClassRequest.java:36)<br /> at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28)<br /> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.(JUnit4TestReference.java:32)<br /> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.(JUnit4TestClassReference.java:25)<br /> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:41)<br /> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:31)<br /> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)<br /> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)<br /> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)<br /> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)<br /><br /><br />Here is my code:<br /><br /><br />@RunWith(Categories.class)<br />@IncludeCategory(BotTest.class)<br />@Suite.SuiteClasses({<br /> AllTests.class<br />})<br />public class BotTestSuite { }<br /><br />interface BotTest { }<br /><br />@RunWith(ClasspathSuite.class)<br />public class AllTests { }<br /><br />Am I doing what you intended?A little shellfish in Michiganhttps://www.blogger.com/profile/00403563779779192639noreply@blogger.com