Forum Discussion
2 Replies
- You could right an event handler (http://www.soapui.org/Scripting-Propert ... dlers.html) for "TestSuiteRunListener.afterRun"
Or just write an external script to move and transpose the files.
Michael Giller
SmartBear Software - ManimaranOccasional ContributorHi,
i have used this code and it doesn't print the whole content available in the script log tab. i see some 18 lines of log content is available (each line is printed from the test case as test case log, the content is request and response). but only 15 lines of log content is printing in the file. Please help me if anything is missing.
def logArea = com.eviware.soapui.SoapUI.logMonitor.getLogArea( "script log" )
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def projectPath = groovyUtils.projectPath
def datetime = new Date().format("yyyy-MM-dd'T'HH-mm-ss SSS")
def logFile = new File(projectPath + "\\logs\\" + datetime + ".txt")
logFile.write("Script Logs In a file.\r\n")
if(logArea !=null)
{
def model = logArea.model
if(model.size > 0)
{
for(c in 0..(model.size-1))
{
logFile.append(model.getElementAt(c).toString() + "\r\n")
}
logFile.close()
}
}