我正在尝试通过Eclipse从Maven Run配置读取VM参数。但是我无法读取输入内容。
String TestSuiteName;
String SoapUISuiteFile;
@Parameters({ "SoapUISuiteFile","TestSuiteName" })
@BeforeClass
public void beforeClass(String SoapUISuiteFile,String TestSuiteName) {
System.out.println("Entered into before class");
System.out.println("TestSuiteName "+TestSuiteName);
this.TestSuiteName = TestSuiteName;
this.SoapUISuiteFile = System.getProperty("user.dir")+"\\resources\\"+SoapUISuiteFile;
}
-DTestSuiteName =烟雾
<?xml version="1.0" encoding="UTF-8"?>
<listeners>
<!-- <listener class-name="com.cs.ui.report.ExtReportListener" /> -->
<listener class-name="com.acxsys.ocp.api.emt.ks.report.EMTReportListener" />
</listeners>
<test name="SOAP UI JAVA">
<parameter name="TestSuiteName" value="Sanity"/>
<parameter name="SoapUISuiteFile" value="kevin-poc-soapui-project.xml"/>
<classes>
<class name="com.acxsys.ocp.api.emt.sanity.SoupOCPAutomationRunner" />
</classes>
</test>
我正在尝试从VM读取一个值并将其设置为testng.xml,但它不会覆盖现有值。