Contributions
how to set environment variable to use in loadtestrunner
Hi, i am trying to read an environment variable in a groovy script: def host = context.expand('${#Env#API_HOST}') i set the environment variable: export API_HOST="https://api.host.com" when i run: echo $API_HOST i get: https://api.host.com when i run the groovy script from soapui: log.info context.expand('${#Env#API_HOST}') i get null or an empty string. when i run loadtestrunner with a step including: def host = context.expand('${#Env#API_HOST}') the host is still empty. any idea on how i can resolve this? am i setting the environment variable correctly? am i trying to access the environment variable in the groovy script correctly? any more info i can provide? thanks a lot.Solved2.8KViews0likes3Comments- 10KViews0likes6Comments
- 2.7KViews0likes0Comments
Error importing swagger
I am getting a error when importing swagger json. it seems to partial import. groovy.lang.MissingPropertyException: No such property: sampleContent for class: com.eviware.soapui.impl.rest.RestRepresentation What could be causing it? I do not see sampleContent in any of my swagger.json files. I checked the json in the swagger editor and it processed without errors. Is there something else i need to do?2.8KViews2likes3CommentsRe: how to pass groovy context array to other testCases in testSuite
Thanks for the response but that is what Isaid in my original post Icould do butthought it a bit messy. Iwant to have an array or list passed between test cases. If it is not possible i will try that. Thanks again2.7KViews0likes0CommentsRe: how to pass groovy context array to other testCases in testSuite
Hi rao, thanks for your reply. I am not using the testCases as such and I am having testCases that rely on other testCases. I have a suite of cases that run sequentially [some getting clients, tokens, etc to use in other test steps] I suppose im just using the testCases as containers forteststeps. My case here is I have a request in one testCase that returns an object of items which I want to use to compare to another array in another request later in differenttestCase. I would like to avoid having all of the test steps in 1 testCase. Thanks2.8KViews0likes4Comments