Forum Discussion
- SmartBear_SuppoSmartBear Alumni (Retired)Hello,
yes - you can use
com.eviware.soapui.SoapUI.logMonitor.getLogArea("script log").clear()
Regards,
Vladimir
SmartBear Software- stefOccasional Contributor
Actually it should be:
com.eviware.soapui.SoapUI.logMonitor.getLogArea("Script log").clear()
Note the capital S.
- PramodYadavContributor
Note that below command only works if you run your tests from " Test case" or the " Test Steps group" -> just below test case name".
If you try to run below from a stand alone groovy step, this will not clear the log. Be aware! Had us wondering for few days.
com.eviware.soapui.SoapUI.logMonitor.getLogArea("script log").clear()
- tech321Contributor
com.eviware.soapui.SoapUI.logMonitor.getLogArea("Script Log").clear()
Capital S and Capital L in "Script Log"
then it works fine , thanks
- eurdimOccasional Contributor
looks like the "com.eviware.soapui.SoapUI.logMonitor.getLogArea( "Script log" )" always returns null with ReadyAPI 2.3.0, no matter if executed in groovy teststep script or as Setup Script on testcase or testsuite level
- gauravkhuranaOccasional Contributor
though they should not make such changes
try with capital L it works
i mean change "Scipt log" to "Script Log"
com.eviware.soapui.SoapUI.logMonitor.getLogArea("Script Log").clear()
- rfortuneContributorGreat - thanks for the response!
- eurdimOccasional Contributor
yes exactly that's the point: it's case sensitive and the name of the log file area has to be set exactly as it appears on the UI - unfortunately they use different versions all over the place:
SoapUI 5.4.0: "script log"
ReadyAPI 2.2.0: "Script log"
ReadyAPI 2.3.0: "Script Log"
:smileyfrustrated:
another interesting question regarding this topic is why the statement
"com.eviware.soapui.SoapUI.logMonitor.getLogArea( "..." )"
works if executed manually via UI but fails if executed automatically via maven plugin on the CI:
NullPointerException: Cannot invoke method getLogArea() on null object
another post mentioned the same already guessing that it only works in the environment with a UI present, but I am curious if we really have to live with that or if there's asolution to get this working in maven as well
- Nastya_KhovrinaSmartBear Alumni (Retired)
The "Script Log" area only applies to the GUI and not the command line. But, you can use a content of the ReadyAPI log files which are located in the C:\Users\%username%\.readyapi\logs folder by default.
Related Content
- 3 years ago
Recent Discussions
- 14 days ago
- 21 days ago