Forum Discussion
stephensurya
15 years agoNew Contributor
Dan,
Thanks for the help. Coincidentally, I stepped on those same methods myself. But for my requirement I wanted something global so I ended up doing this:
I created a properties file "test.properties" with few properties. All my Resources in the SoapUI test cases use the ${#Global#propertyName}.
Now, for running the test cases from the tool I load the properties file from "File ==> Preferences ==> Global Properties"
For running the same test cases from Junit I do:
SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
String properties[] = new String[5];
properties[0] = "propertyName0=" + propertyValue0;
properties[1] = "propertyName1=" + propertyValue1;
properties[2] = "propertyName2=" + propertyValue2;
properties[3] = "propertyName3=" + propertyValue3;
properties[4] = "propertyName4=" + propertyValue4;
runner.setGlobalProperties(prop);
runner.setTestCase(testCaseName);
runner.run();
This is working for now.
thanks,
Stephen
Thanks for the help. Coincidentally, I stepped on those same methods myself. But for my requirement I wanted something global so I ended up doing this:
I created a properties file "test.properties" with few properties. All my Resources in the SoapUI test cases use the ${#Global#propertyName}.
Now, for running the test cases from the tool I load the properties file from "File ==> Preferences ==> Global Properties"
For running the same test cases from Junit I do:
SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
String properties[] = new String[5];
properties[0] = "propertyName0=" + propertyValue0;
properties[1] = "propertyName1=" + propertyValue1;
properties[2] = "propertyName2=" + propertyValue2;
properties[3] = "propertyName3=" + propertyValue3;
properties[4] = "propertyName4=" + propertyValue4;
runner.setGlobalProperties(prop);
runner.setTestCase(testCaseName);
runner.run();
This is working for now.
thanks,
Stephen
Related Content
- 6 years agoAAB
- 6 months agomacheshmeh
Recent Discussions
- 16 hours agoemoya
- 19 hours agoMyBalanceNow