Some of my tests show prepended with junit.framework

93 views Asked by At

I have a set of junit tests that run automatically on my build server (Jenkins).

I run more than 500 tests. Most of them, in the test results view, show up with the correct package value

Example : results for com.test.app.RollingArchiveTest

But I have 8 tests that have junit.framework prepended to them.

So it would give : junit.framework.com.test.app.RollingArchiveTest

What is really strange is that I see both behaviors in tests that belong to the same package. Some classes are prepended and some are not.

I looked at the code, and founds nothing really obvious. The tests all run using the same command so I would not expect any change there.

I could not really find any information about that on the web.

Would you have any clue what could cause this?

I am not sure if it is relevant, but all the test cases for classes that have junit.framework prepended to them are skipped.

Thanks

1

There are 1 answers

0
jlengrand On BEST ANSWER

Ok, diving deeper I realized that in all the classes I use the Assume statement.

When this assume firing in the @BeforeClass, I end up with the junit.framework.TestSuite prepended.

So the solution would be to avoid Assuming anything in the BeforeClass.