In SoapUI (I am using 5.2.1) one of requests is login. I have to pass username and password as element values in xml. Is there a way to hide my password from being displayed as plain text in request body?
1 Answer
Yes, it is possible to mask the password.
In order to achieve that:
- create a test case level custom property, and property name, say
PASSWORD
then provide the value which will mask the value once you hitreturn
key. - in the request, where the value is required use
${#TestCase#PASSWORD}
if test case level property is used. - it is also possible to define
PASSWORD
property at project level as well, so that you can avoid creating property for each test case. In that case, request should have the value${#Project#PASSWORD}
.
Hope this helps.
-
It might be worth pointing out: The masking of the value in the UI is a feature provided by SoapUI, which just looks for certain keywords in the key field. However, the password itself is stored in plain-text in the SoapUI project file!– SiKingCommented Aug 22, 2016 at 21:06
-
@SiKing It is enough because person who is standing next to you, does not see your password and it is safe to do copy-paste, so the problem is solved! Commented Aug 23, 2016 at 10:18