Forum Discussion

EmilDK's avatar
EmilDK
Occasional Contributor
8 years ago

Setting Custom Properties on project level through JUnit

Hello!

 

I'm running automated SOAPUI tests through JUnit.

I've succeded transferred properties to the different Test Cases by sending a Map of different properties - but now I need to do the same on project level("Custom Parameters).

 

I've tried this:

 

SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
runner.setProjectFile(folder + "\\" + s);
runner.setIgnoreErrors(true);
runner.setProjectProperties({"DbUsername=testuser","DbPassword=testpw"});
runner.run();

 

Unfortunately it doesn't work - the properties(e.g: #Project#DbUsername) remain empty when running the code.

 

Any ideas how to fix this? :)