如何在TestNG生成的JUnit报告中更改测试用例名称?

时间:2020-08-26 08:14:03

标签: junit testng

我想将name =“ loginFail”更改为name =“ XXX”,通过覆盖ITest接口的getTestName()方法无法正常工作,谢谢。

我想将name =“ loginFail”更改为name =“ XXX”,通过覆盖ITest接口的getTestName()方法无法正常工作,谢谢。

TestNG生成的TestNG JUnit报告:

poi-4.1.1.jar

TestNG该类实现ITest接口的代码:

    <?xml version="1.0" encoding="UTF-8"?>
    <testsuite hostname="macbook" failures="0" tests="2" name="com.ngtesting.autotest.test.login.TestLogin" time="0.005" errors="0" timestamp="2020-08-26T15:58:11 CST" skipped="0">
      <testcase classname="com.ngtesting.autotest.test.login.TestLogin" name="loginFail" time="0.005"/>
      <testcase classname="com.ngtesting.autotest.test.login.TestLogin" name="loginFail" time="0.000"/>
    </testsuite>

0 个答案:

没有答案