Forum Discussion

stonaker's avatar
stonaker
Occasional Contributor
11 years ago

How to access Environment properties?

We are using this guidance to try to configure multiple environments in SoapUI: http://www.soapui.org/Working-with-Proj ... oapui.html

How to access Environment property variables such as Endpoint, Username, etc? My first (naive) attempt tried ${#Env#Username} but this got me my Windows username, not my Soapui Environment username.

I have tried every property prefix listed here (http://www.soapui.org/Scripting-Propert ... nsion.html) but with no luck.

What's the right way to access values of these Environment variables like Username?
  • stonaker's avatar
    stonaker
    Occasional Contributor
    Turns out I was thinking about this backwards! I ended up creating TestCase-level properties for Username and Password, then using property expansion in the Environment vars configuration dialog. Works like a charm with LoadUI and a DataSource from a csv.