getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'
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.
- Labels:
-
Automation Environments
-
REST
-
Scripting
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@TanyaYatskovska That was a copy - paste issue while phrasing the question. But In my script, I've closed all the brackets.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Stacktrace?
What is the OS, its version?
What is ReadyAPI version?
Is it possible to show system properties. In the tool, use Menu -> Help -> system properties
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like you are hitting some know bug (not directly realated to ReadyAPI, but coming from under line libraries, IMO)
https://www.google.com/search?client=ubuntu&channel=fs&q=BUG%21+exception+in+phase+%27semantic+analy...
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Sonya Mihaljova
Community and Education Specialist
