You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mugdha Acharya <mu...@mir3.com> on 2010/10/06 19:23:56 UTC

run junit categories from ant

How do you run junit categories from ant. It will be nice if someone
can post an example. I have tried following 

Java code-

@RunWith(Categories.class)
@IncludeCategory(MyCategory.class)
@SuiteClasses( {A.class }) // A.class has test methods with category
myCategory
public class MyCategorySuite{
}



In build.xml -
<target name="run-my-category"> 
    <junit printsummary="on">
	<classpath refid="runtime-tests-classpath"/>
	<classpath refid="cobertura.classpath"/>
	<formatter type="brief" usefile="false" />
	<test name="${runtimeTest-src.dir}/MyCategorySuite"/>			    
    </junit>
</target>

ant is running just MyCategorySuite and complaining about not finding
any method to test. What am I missing here?


Thanks,
Mugdha