如何设置属性-Djavax.net.ssl.trustStore =" E:\ trust.jks"对于testng?

时间:2015-11-23 07:20:15

标签: ant testng java-opts

我正在使用ANT运行testng文件,我想设置属性-Djavax.net.ssl.trustStore =" E:\ trust.jks"。

1 个答案:

答案 0 :(得分:0)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" parallel="false" verbose="2">
    <test name="Test">
        <method-selectors>
            <method-selector>
                <script language="beanshell"><![CDATA[ System.setProperty("username","TestNG");return true;]]>
                </script>
            </method-selector>
        </method-selectors>
        <classes>
            <class name="organized.chaos.testng.FunnyTest" />
        </classes>
    </test> <!-- Test -->
</suite> <!-- Suite -->

这个解决方案对我有用。在套件中指定。 https://groups.google.com/forum/#!topic/testng-users/v1SK8zxRwM8