Not able to execute tests with @Test annotation when my test extends TestCase(Junit) in Eclipse

后端 未结 3 1615
无人及你
无人及你 2021-01-16 14:04

Not able to execute tests with @Test annotation when my test extends TestCase(Junit) in Eclipse

It works fine when I am not extending from TestCase(jUnit), but my ex

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-16 14:33

    Tests that extend junit.framework. TestCase are considered to be JUnit3-style tests by the JUnit4 runner. This is correct.

    To @Test annotation you need NOT extend junit.framework. TestCase and @Test annotation works fine

提交回复
热议问题