java - Junit running subclass invokes superclass testcases -
this question has answer here:
- junit ignore @test methods base class 8 answers
say there're 2 junit classes, bigtest , smalltest. smalltest subclass of bigtest, , both contain tests. when trying run smalltest in eclipse junit testing, testcases in both classes run, instead of testcases in smalltest being run. why so? there way run smalltest's testcases without invoking bigtest's testcases?
if derive 1 test other (which consider bad practise) derived class inherits methods.
junitrunner searches methods starts "test", , finds of course methods parent , sub class.
Comments
Post a Comment