Hi, even though this concerns TestNG I hope the post is adequate.
I have a situation where I want to use Surefire to call my TestNG
tests using the groups element.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<configuration>
<skipTests>false</skipTests>
<groups>unit_tests, integration_tests</
groups>
</configuration>
Scenario:
In class A I populate a Repository and uses the elements
later on in dependent tests in class A.
My problem is that the tests in class A has a dependency to test in
class B. The dependency is, due to @Autowired members that I can't
seem to get control of. The Repository in cleared in the call (call-
chain) to class B, leaving an empty repository when i get back to
class A.
The solution I found was to use the group-by-instances=true option,
letting the test in class A run in (isolation?) leaving the @Autowired
member un affected by class B.
The next problem is that I can't find any way to use Maven-Surefire
and feeding that option to TestNG :-(!
I really don't want to manage a testng.xml file, I love using
annotations for managing tests to run :-)! And I don't want to mess up
my tests with dependencies between test A and test B.
Is there a way?
Regads
/Jonas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]