Search code examples
eclipseantseleniumtestngreportng

How to set sysproperty in testng using eclipse?


I have to set 'sysproperty key="org.uncommons.reportng.escape-output" value="false"/' in TestNG.

  1. Let me know how to do it using eclipse.
  2. Also let me know how to create a TestNG ANT task if I can not use eclipse to set the property.

Thanks in Advance.


Solution

  • The fist part of question could be addressed by accessing following menu - Run -> Run|Debug Configuration -> Your Configuration -> 'Arguments' tab -> VM arguments. Add following line to the text area:

    -Dorg.uncommons.reportng.escape-output=false
    

    For the second question, refer to TestNG Ant documentation:

    <testng>
       <sysproperty key="org.uncommons.reportng.escape-output" value="false"/>
       <!-- the rest of your target -->
    </testng>