Wiggumon
12 years agoOccasional Contributor
Saving Test Results to File
Hello,
I have been saving test results to a file using an event: TestRunListener.afterStep with the following source.
This works great! One question I have though. Is it possible to write out all the same data but leave any password or username information out of the output? All other data is great...
Thanks!
I have been saving test results to a file using an event: TestRunListener.afterStep with the following source.
def filePath = 'c:/output/'
def fileOutputStream = new FileOutputStream(filePath + testStepResult.testStep.label + '.txt', true)
def printWriter = new PrintWriter(fileOutputStream)
testStepResult.writeTo(printWriter)
printWriter.close()
fileOutputStream.close()
This works great! One question I have though. Is it possible to write out all the same data but leave any password or username information out of the output? All other data is great...
Thanks!