Ask a Question

Missing methods in ReadyAPI SDK documentation and Groovy editor hints

KarelHusa
Super Contributor

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):

 

KarelHusa_0-1649835056911.png

 

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

 

Karel@apimate.eu
https://apimate.eu
1 REPLY 1
aaronpliu
Frequent Contributor

Hi @KarelHusa ,

There is a method called "getActiveEnvironment" which return object of Environment, and can get its name. For example: project.activeEnvironment.name

As for getActiveEnvironmentName(), I did not also find it and never use it since I've no idea

There are several different API docs for ReadyAPI (Open source and Pro).

Pro:

https://support.smartbear.com/readyapi/apidocs/pro/index.html?overview-summary.html

Open:

https://support.smartbear.com/readyapi/apidocs/soapui/index.html?overview-summary.html

SoapUI:

https://www.soapui.org/apidocs/5.5.0/index.html (This one is useful but seems no longer maintain)

 

@TanyaYatskovska , Would you please suggest which API docs to reference for ReadyAPI tool?

 

 

Thanks,

/Aaron

 

cancel
Showing results for 
Search instead for 
Did you mean: