Hi All. I'm working on the script library in readyAPI 2.8.0
I have a readyAPI project saved in C/soapui and I've created a folder called GroovyLibrary inside the project folder (C/soapui/GroovyLibrary). I place my below script inside the groovyLibrary folder.
package soapui .GroovyLibrary
class Callee
{
String hello()
{
return "Hello world!"
}
def static salute( who, log ) { log.info "Hello again $who!" }}
I followed the exact the way it mentioned in the below documentation
but while executing the groovy from readyAPI; I'm getting below execption
BUG! exception in phase 'semantic analysis' in source unit 'Script2.groovy' The lookup for Callee caused a failed compilaton. There should not have been any compilation from this call.
How can I rectify this? anyhelp would be appreciated.
Thanks.
Solved! Go to Solution.
Thanks everyone for trying to help!
Hi @arunbharath , it’s also worth updating ReadyAPI to 3.0.0 and checking if the issue still persists.
If it does, I would suggest contacting the Support Team since this might require deeper investigation. Thank you.
HI @arunbharath,
Could you please make sure that you have a closed bracket { at the end of the Callee.groovy file? I don't see it at the moment.
Community, @jsheph01,@JoostDG, @AlexKaras, what can be the cause of this error from your point of view?
@TanyaYatskovska That was a copy - paste issue while phrasing the question. But In my script, I've closed all the brackets.
Is there any alternate approach? I want to automate UI using selenium for that I need some common class in a script. so I can re-use the script by calling its method with paramaters.
In Other words,
1) I need a class in groovy with couple of methods like login(string ,string), logout()
2) In readyAPI , I have to call above login(string ,string) in anotherscript with paramaters. How can I achieve this? I'm stuked. any help is appreciated.
Thanks everyone for trying to help!
Hi @arunbharath , it’s also worth updating ReadyAPI to 3.0.0 and checking if the issue still persists.
If it does, I would suggest contacting the Support Team since this might require deeper investigation. Thank you.
Subject | Author | Latest Post |
---|---|---|