Forum Discussion

rajs2020's avatar
rajs2020
Frequent Contributor
4 years ago
Solved

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?