Is it possible to parameterize the user credentials in the soapui free version ?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to parameterize the user credentials in the soapui free version ?
Hi,
I am using the soapui free version. I need to run my tests with different credentials by giving different endpoints for dev and staging. Is it possible to parameterize this in the free version or we need to buy the pro version to achieve this?
Regards,
Daniel
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Daniel,
Yes, although the pro version does have the environment feature, this is very doable in the open source version, there are several effective ways to accomplish this.
One way is to use a Properties TestStep. These can be used to load properties from a simple text file as part of a TestCase e.g. a file containing:
environmentName=QA Environment
invoiceEndpoint=http://localhost:9001
userName=test
password=password
These properties can then be referenced eslewhere in the TestCase e.g. to set Request TestStep properties/value using property expansions e.g. like
def environmentName = context.expand('${LoadProperties#environmentName}')
Note you can also supply the file name as a property that could be supplied as a project level property e.g. reference with ${#Project#propertiesFileName}
Also as a runtime parameter (-PpropertiesFileName=...) if running SoapUI from a runner script e.g. testrunner.sh. Note you could supply all your properties this way, there is also a -e enpoint parameter for the runner script.
See also http://www.soapui.org/scripting---properties/working-with-properties.html
Hope this gives you some ideas,
Cheers,
Rupert
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank u so much Rupert 🙂
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dan,
No problem, very happy to help! 🙂
Did this fix your problem?
Cheers,
Rupert
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rupert,
Sorry for the delayed response. It fixed the problem 🙂
Best regards,
Daniel
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Daniel,
Thanks for letting me know, glad you're sorted, it also potentially helps others to know that the problem is solved and they can use the solution - if you're happy too please can you also mark the topic as solved?
Thanks,
Rup
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not able to find the link to solve on this page.
Regards,
Daniel
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Come to think of it I have never submitted a post, only answered them! 🙂
Isn't it in the 'options' in the top right of each post?
Cheers,
Rup
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess you meant 'Accept as Solution'. I have clicked it now 🙂
Regards,
Daniel
