Forum Discussion
hello,
first doubt should be on "request log" which soapui version you use ?
I use SoapUi 5.4.0 and this tab don't exist. I have Soapui Log, script log.. and perhaps you want to use "http log"
I use REST requests, and detail log, in real time displays in "http log".
So tell me your error please. If you have a "java.lang.NullPointerException" that is the explanation.
second doubt in declaration of groovyUtils. I use GroovyUtils(context) syntax in all my scripts, and it works.
I don't understand why you write it in your code but anyway :)
at the end, i use ToString() function to log information , and try catch to get error if it occurs; this is more "safe code" to execute entirely without stop.
So here is a complete example solution, to replace your code :
try {
def logArea = com.eviware.soapui.SoapUI.logMonitor.getLogArea( "http log" ); def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) if( logArea !=null ) { def model = logArea.model // only continue of logArea not empty if( model.size > 0 ) { for( c in 0..(model.size-1) ) { log.info(model.getElementAt(c).toString() + "\r\n") } } }
} catch (IOException ee) { ee.printStackTrace() }
Related Content
- 3 years ago
Recent Discussions
- 2 days ago
- 4 days ago