I have 5 test classes in the package: X.Y.Z
Test Classes are those following: A,B,C,D,. They are identical. Everything is same in the classes. Only difference is that there is another fields in the class.
The main problem (confusing problem) is that, MVN runs A,B,C test cases but not "D".
In the log there is written only this:
------------------------------------------------------
T E S T S
-------------------------------------------------------
Running ge.ddrc.transport.controller.rest
Running x.y.z.A
...
Running x.y.z.B
...
Running x.y.z.C
I use Eclipse. In eclipse I can run the test case (As A JUnit Launcher) without problem. This class looks Like this:
@Transactional
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration(locations = { "/junit/spring/config/root-context.xml" })
public class D{
@Autowired
private TestService testServ;
private MockMvc mockMvc;
@Autowired
private FilterChainProxy springSecurityFilterChain;
@Autowired
private WebApplicationContext wac;
@Before
public void setup() {
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).addFilters(this.springSecurityFilterChain).build();
}
@Test
public void getInfo() throws Exception {
System.out.println("OK INVOKED");
}
}
Could you tell me what happens? why mvn does not want to run this class. Is there any issue? mvn run another test cases but not this.