angry_gopher
angry_gopher

Reputation: 1725

Maven sure-fire plugin is not running second test class for the same original class

I have original test class named OriginalTestClass and two test classes for it that bring testing upon different method of OriginalTestClass. Their names are:

I can see that only the first test class OriginalTestClassTest was run and OriginalTestClassTestNotParameterized was not. Why is that? Any settings for that?

Upvotes: 0

Views: 67

Answers (2)

khmarbaise
khmarbaise

Reputation: 97527

The naming convention is your problem...cause the naming schema is like this:

<includes>
 <include>**/Test*.java</include>
 <include>**/*Test.java</include>
 <include>**/*TestCase.java</include>
</includes>

The class OriginalTestClassTestNotParameterized does not follow this schema and that's the reason why it is not running. You could of course change the configuration but i would recomment to follow the naming schema.

Upvotes: 1

Ori Dar
Ori Dar

Reputation: 19020

The reason is that the plugin uses class names convention in order to identify test classes. You should change the second class name to something like OriginalTestClassNotParameterizedTest or TestOriginalTestClassNotParameterized

See test goal includes parameter for more

Upvotes: 2

Related Questions