Then there is no overridding.
> 2) when enabled=false is set at the class level then all method in
> the class are disabled unless the behaviouir is ovrriden by
> enabled=true at a method level - in which case the @Before... and
> @After... methods should be triggered if at least one test method is
> enabled as example above.
>
Yes, I think you are right. If you can send out a small testcase
reproducing the problem then it will be easier and quicker for us to
get to it.
> My reason for doing this was because my test class implemented an
> interface that has a lot of public methods that are not actually
> tests. So rather than annotating each non-test method with
> enabled=false, I did it at a class level and just annotated the one or
> two test methods with enabled=true ... yes I'm a lazy programmer.
> Having a Test class implement some interface may not be good design
> but I came across this while migrating someone's junit test cases. The
> workaround is to annotate all the non-test methods with @Test(enabled
> = false), but I thought it was still worth mentioning as a potential
> bug.
>
The only thing I am not sure about your first example: why do you need
the top/class level @Test annotation? If you just remove it, and
annotate the 2-3 methods you have as tests things should work.
./alex
--
.w( the_mindstorm )p.
TestNG co-founder
EclipseTestNG Creator
=======================================================
I also add another problem:
I am using the TestNG eclipse plugin.
I run the test class; and all tests fail. So I go on the "Failed test" tab, and try to run or debug a failed test randomly chosen, but nothing happens.
I _don't_ want to run testng-failed.xml because it contains all the test. All i neeeeeed is one.
To be more specific: the test is a factory one. Is it possible that this situation is not handled by testng eclipse?
Test case attached.
=======================================================
Cheers,
Saverio
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=173916&messageID=249122#249122