パッケージには 5 つのテスト クラスがあります: XYZ
テスト クラスは次のとおりです。A、B、C、D。それらは同一です。クラスではすべてが同じです。唯一の違いは、クラスに別のフィールドがあることです。
主な問題 (紛らわしい問題) は、MVN が A、B、C テスト ケースを実行するが、「D」は実行しないことです。
ログにはこれだけが書かれています:
------------------------------------------------------
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
私はエクリプスを使用しています。Eclipse では、テスト ケース (JUnit ランチャーとして) を問題なく実行できます。このクラスは次のようになります。
@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");
}
}
何が起こるか教えていただけますか?mvn がこのクラスを実行したくない理由。問題はありますか?mvn 別のテスト ケースを実行しますが、これは実行しません。