TestNGで「syspropertykey="org.uncommons.reportng.escape-output" value ="false"/」を設定する必要があります。
- Eclipseを使用してそれを行う方法を教えてください。
- また、Eclipseを使用してプロパティを設定できない場合のTestNGANTタスクの作成方法を教えてください。
前もって感謝します。
頻繁に変更する必要がない場合は、pom.xmlのmaven-surefire-pluginにsyspropertyVariableとして追加することもできます。それ以外の場合は、前の回答のようにVM引数を使用します。
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.6</version>
<configuration>
<properties>
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value>org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter</value>
</property>
</properties>
<reportsDirectory>target/surefire-reports</reportsDirectory>
<skipTests>false</skipTests>
<systemPropertyVariables>
<org.uncommons.reportng.escape-output>false</org.uncommons.reportng.escape-output>
</systemPropertyVariables>
</configuration>
質問の最初の部分は、次のメニューにアクセスすることで解決できます-実行->実行|構成のデバッグ->構成->'引数'タブ->VM引数。テキスト領域に次の行を追加します。
-Dorg.uncommons.reportng.escape-output=false
2番目の質問については、TestNGAntのドキュメントを参照してください。
<testng>
<sysproperty key="org.uncommons.reportng.escape-output" value="false"/>
<!-- the rest of your target -->
</testng>