Hey!
quick question for the groovy scripters out there.
the latest version of the script records everything and splits it out into a hierarchical structure on the drive is as follows:
def pName = context.currentStep.testCase.testSuite.project.name //get project name
def pDate = new Date().format( 'yyyyMMdd' )//get current date
def sDate = pDate.toString()//convert date to string
def pTestSuite = context.currentStep.testCase.testSuite.name//get TestSuite name
def pTestCase = context.currentStep.testCase.name//get TestCase name
def filePath = 'D:/Donor Marketing/SoapUI/SOAPUI LOGGING SCRIPT/soapUI-results/'+pName+'_'+sDate+'/'+pTestSuite+'/'+pTestCase+'/'//compose the folder path
File file = new File(filePath)
if (!file.exists()) file.mkdirs()//create the destination folder
fos = new FileOutputStream(filePath+ testStepResult.testStep.label + '.txt', true)
pw = new PrintWriter( fos )
testStepResult.writeTo( pw )
pw.close()
fos.close()
HOWEVER - I am using this in a datalooped parameterized test case which is sourcing a hundred records from a hundred individual testdata files.
The request/response capturing is great for getting the QA Team off my back, however - the requests/responses are listed sequentially but without any identifiers indicating which instance of test case the results/responses relate to. The only thing I can do at the moment is count through the results in the particular file (associated to the test step) to find the record's results/responses I need.
I was wondering if anyone had found a way to split out the request/responses (within the test step's output file) - even if just adding a simple number to indicate which result/response was for which instance of test (e.g. so I can tell which testdata file caused the request/response details captured in the file).
hanks to any and all,
richie