Forum Discussion
stephensurya
16 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
- 9 years ago
- 6 years ago
- 10 months ago
Recent Discussions
- 3 days ago