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

Reply via email to