Changing Custom Properties while Runnig TestSuite From Java
Hi Team,
I am running SOAP UI Project from standalone java project which has one TestSuite with 3 Test cases in which the data is dynamically populated.
When i run the test cases from SOAP UI Tool i added a custom property and assigned the value.
How to do the same while i am running from My Java Code.I tried to get the Project Properties and Set but it is not working.
Please let us know the best option to achieve the same , below is the code snippet.
System.setProperty("soapui.home", "C:\\Program Files\\SmartBear\\ReadyAPI-2.2.0");
// Create a test runner object
SoapUIProTestCaseRunner runner = new SoapUIProTestCaseRunner();
// Specify the path to the project file
runner.setProjectFile("C:///SoapUI.xml");
// Specify the test suite to run
runner.setTestSuite("TestSuite 1");
// String a[] ={"currencyCode=xxx"};
// runner.setProjectProperties(a);
// Specify the test case to run
// It must be in the test suite specified above
runner.setTestCase("TESTCASE1");
// runner.setEnableUI(true);
// Command the runner to create a printable report
runner.setPrintReport(true);
runner.setJUnitReport(true);
runner.setJUnitReportWithProperties(true);
// Start the test run
runner.run();