Forum Discussion

KarelHusa's avatar
KarelHusa
Champion Level 3
3 years ago

Missing methods in ReadyAPI SDK documentation and Groovy editor hints

I would like to get an active environment within a Groovy script.

I have learned there is a method getActiveEnvironmentName and can use it in a script:

 

project = testRunner.getTestSuite().getProject()
log.info "Project :" + project.getName()
log.info "Environment: " + project.getActiveEnvironmentName()

The script produces an expected output:

 

Wed Apr 13 09:24:39 CEST 2022: INFO: Project :LWS
Wed Apr 13 09:24:39 CEST 2022: INFO: Environment: TEST

 

But I wonder I do not get this method in the Groovy script code hints (Ctrl+SPACE):

 

 

I also was not able to find this method also in the SDK documentation: https://support.smartbear.com/readyapi/apidocs/soapui/DefaultPackage/Project.html

Also other Project methods mentioned in the ReadyAPI documentation are not available in the SDK specification, e.g. project.getEnvironmentByName or
project.setActiveEnvironment mentioned in:

Can you please advise where to find the appropriate SDK specifications?

 

Best regards,

Karel

 

1 Reply