0
ITestListenerインターフェイス& TestListenerAdapterクラスメソッドを使用して2つの方法でレポートをカスタマイズする具体的な手順を探しています。リスナーを使用したテストレポートの具体的な手順
ここで変更するリソースはありますか?
@override
onTestfailure(ITestResult tr)
{
log("Failed");
}
@override
onTestSuccess(ITestResult tr)
{
log("Passed");
}
1-テストクラス
public class Mytest()
{
@Parameters({ "first-name" })
@Test
public void testSingleString(String firstName) {
System.out.println("Invoked testString " + firstName);
assert "xxx".equals(firstName);
}
}
2 - testng.xml
<suite>
<listeners>
</listeners>
<parameter name="first-name" value="xxx"/>
<test name="MyTest">
<classes>
<class name="example1.Mytest"/>
</classes>
</test>
</suite>
注:私はTestNGのとして実行]を使用して、私のTestNG日食を実行します。
使用しているEclipseのバージョンは? –
そのインディゴ..... – smriti