cancel
Showing results for 
Search instead for 
Did you mean: 

Groovy Script log.info message not shown in TestCase Log

SOLVED
Dear Community, API Masterminds week 4 has started!

Participate in the exciting online event by posting questions or replies and win! During the entire March, we decide top contributors each week and reward them with great gifts . Congratulate the winners of Week 3 here.
Week 4 task: Ask more questions, bring interesting topics and reply to existing ones in the ReadyAPI Community
Topics to participate in:
See All
Week 4 Leaders:
Members with the biggest number of posts
sonya_m 16 posts
nmrao 14 posts
HimanshuTayal 12 posts
pizzaTime 1 posts
richie 1 posts
Highlighted
New Contributor

Groovy Script log.info message not shown in TestCase Log

Hello all,



I'm experiencing something weird in Ready! API 1.1.0, for which, after couple of hours digging in different forums, I'm unable to find any solution yet.



When creating a simple Groovy Script  with the following statement



log.info ("hello!")



and pressing the run-button, the result is nicely shown in the 'Log Output' panel at the bottom.



But when running the TestCase - with only one teststep containing this Groovy Script - the 'TestCase Log' at the bottom states that the Groovy Script has ran OK and the testcase finishes succesfully.



However, the specified log.info statement is not shown in this console. What am I doing wrong?



Thanks for any advice.



lars
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

RE: Groovy Script log.info message not shown in TestCase Log

Hi,



The output from the log.info method is in the "script log" tab that is part of the "Logs" section in Ready! API.  If you are unable to find this I can send you a screen shot.





Regards,

Marcus

SmartBear Support


 Join the 2020 API Masterminds event in the ReadyAPI Community to demonstrate your excellent expertise, help people and win prizes! Start participating today!

View solution in original post

8 REPLIES 8
Highlighted
Moderator

RE: Groovy Script log.info message not shown in TestCase Log

Hi,



The output from the log.info method is in the "script log" tab that is part of the "Logs" section in Ready! API.  If you are unable to find this I can send you a screen shot.





Regards,

Marcus

SmartBear Support


 Join the 2020 API Masterminds event in the ReadyAPI Community to demonstrate your excellent expertise, help people and win prizes! Start participating today!

View solution in original post

Highlighted
New Contributor

RE: Groovy Script log.info message not shown in TestCase Log

Hi Marcus,



Thanks for your update. I didn't notice the Logs button in the lower left corner, but have already stumbled upon these log consoles via the View menu.



lars
Highlighted
Occasional Contributor

Re: RE: Groovy Script log.info message not shown in TestCase Log

Thanks a lot! It is really puzzle to find this Log panel ;(

Highlighted
New Member

Re: RE: Groovy Script log.info message not shown in TestCase Log

I'm using Groovy scripting for some tasks. I want to write some custom message into the output logs. The script will output to the Log Output panel when running the step by itself. However, I want to broadcast that log entry to the TestCase and LoadTest logs.

 

I'm using SoapUI 5.20 which does not have a script tab.

How do I get the script log.info("Hello world") message to appear in the TestCase and LoadTest logs? 

 

Thank you!

Highlighted
Frequent Visitor

Re: RE: Groovy Script log.info message not shown in TestCase Log

I am facing same problem. I want to output groovy script logs into TestSuite report. Can anyone help? 

Highlighted
Frequent Contributor

Re: RE: Groovy Script log.info message not shown in TestCase Log

Did you ever solve this?

Highlighted
Contributor

Re: RE: Groovy Script log.info message not shown in TestCase Log

the log.info is not shown when using Dataloop. Any idea why?

Highlighted
Occasional Contributor

Re: RE: Groovy Script log.info message not shown in TestCase Log

Hello all

 

I am also facing issue to log the message into test case execution. I would like to print a message in case if test passed. How can I do so?

New Here?
Join us and watch the welcome video:
Join 2020 API Masterminds
We invite all lovers of API testing to participate in the API Masterminds event. Ask questions or help others by giving solutions and get rewarded.
>> Participate Today
Get Your Free Ticket
SBC2020
Top Kudoed Authors