Forum Discussion
8 Replies
- SiKingCommunity HeroI think you are mixing SoapUI parameters and Groovy variables together.
- shabarContributorHi SiKing,
Is there a way to do that?
Basically needs to include SoapUI property value in the groovy script to create the folder path.
Thanks - SiKingCommunity HeroThis is rather basic Groovy scripting.
def soapuiProperty = context.expand( '${some#property}' )
def groovyVariable = "D:/SoapUI/TestResults/${soapuiProperty}_response.xml"
File outputFile = new File(groovyVariable.toString()) // need to convert GString to String or this will fail - shabarContributorAppreciate your help
I want to get REST Test Request Property instead of custom property and tried below as you specified.
def stepName = context.expand( '${Simple Search#Name}' )
log.info stepName
But not able to see the property value.
Am I doing something wrong here?
Thax - shabarContributorSiKing, Thanks for your link it is really useful
In my testcase I want to access previous test step name in immediate next groovy step. I checked any method like getPrevousStep or getLaststep but couldn't find anything.
Is there a other way?
Cheers - SiKingCommunity HeroThis is still basic programming.
You could try something like getCurrentStepIndex() and getTestStepAt(index - 1). - shabarContributorThanks SiKing
Really appreciated.