cancel
Showing results for 
Search instead for 
Did you mean: 

Groovy script - How to find out the actual source or package of a class?

SOLVED
Highlighted
Contributor

Groovy script - How to find out the actual source or package of a class?

I use ReadyAPI 3.0.0 and I cannot upgrade.

Consider the groovy script below which is inside a ReadyAPI test.

 

 

import java.security.*;
import Custom.Authorization;

//some code.

obj = new Authorization();
obj.doSomething();

//more code.

 

 


I want to read the documentation of the Authorization class to learn a bit about it. To find the documentation, I need to know which package that class belongs to. In the ReadyAPI groovy editor, how do I find out which package Authorization actually belongs to?

I'd guess that Authorization belongs to the Custom package because I see it in the import and I don't see any errors or warnings in the editor before I run the script. But, its also possible that the java security package could have classes related to authorization. In contrast, in IDEs like Intellij IDEA, we can simply lookup the package of a class and much more.

So, how do I find out which package is actually the source of the Authorization class, without running the code or digging into folders that contain all our groovy scripts? 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: Groovy script - How to find out the actual source or package of a class?

Hi @rajs2020,

As far as I see, ReadyAPI supports Code Completion. Perhaps, you can get the information you are looking for from it: https://support.smartbear.com/readyapi/docs/testing/scripts/editor.html#code-completion

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

1 REPLY 1
Highlighted
Community Manager

Re: Groovy script - How to find out the actual source or package of a class?

Hi @rajs2020,

As far as I see, ReadyAPI supports Code Completion. Perhaps, you can get the information you are looking for from it: https://support.smartbear.com/readyapi/docs/testing/scripts/editor.html#code-completion

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors