Forum Discussion

youtube2019's avatar
youtube2019
New Contributor
5 years ago

How to use properties from external file in automatically run SOAP UI tests?

How to use properties from external file in automatically run SOAP UI tests?

 

Hello community,

I want to keep my Web Service username and password separately from SOAP UI Test XML file.

So, I save username and password as custom properties in external file called properties.xml.

 

But the problem is that after I manually import the property values (defined on the project level) and save the test, the values are added to the test XML file distinctly.

 

So, anybody who will open the test XML file after me, will be able to read the username and password in my property values. Which I do not want.

 

Inside the test XML file it looks like this:
<con:name>USERNAME</con:name><con:value>!MYUSERNAMEVALUE</con:value></con:property><con:property><con:name>PASSWORD</con:name><con:value>!MYPASSWORD</con:value>

 

Can I use reference to my username and password through the external file properties.xml, while automatically running the test, but not show values in test XML?

 

I thought this configuration would work:

<con:name>USERN</con:name><con:value>${projectDir\properties#USERNAME}</con:value></con:property><con:property><con:name>PASSWORD</con:name><con:value>${projectDir\properties#PASSWORD}</con:value>

 

or this one:

 

<con:name>USERN</con:name><con:value>${projectDir\properties.xml#USERNAME}</con:value></con:property><con:property><con:name>PASSWORD</con:name><con:value>${projectDir\properties.xml#PASSWORD}</con:value>

 

But they are not resolving the propertiy values correctly.

 

Please help. Thank you!

 

2 Replies