How to add a value from a response to the statistics output in SoapUI? -
in soapui can view statistics of load test click on statistics icon.
from here, can export results file.
at nowadays exports times, threads, bytes etc.
is there way can append value response file?
i want maintain times , threads etc want add together value xml node in response.
thanks
you can via groovy script.
add groovy script step test case in soapui.right click , select info > test step > response , corresponding field, soapui automatically create code below (only if utilize pro version, yu can otherwise need write code yourself)
${object1#response#declare namespace ns2=\'http://namespace.suha.com\'; //ns2:namespaceresponse[1]/methodname[1]}
this code takes corresponding field's value.
create variable below
def object1= context.expand( '${object1#response#declare namespace ns2=\'http://namespace.suha.com\'; //ns2:namespaceresponse[1]/methodname[1]}' )
up you’ve taken value of required field response message , created variable value of field. can print variable logs below.
`log.info (“object1")` you can create .txt file , write variable file below.
today = new date() sdf = new java.text.simpledateformat("dd-mm-yyyy-hh-mm") todaystr = sdf.format(today) new file( "d:/" + todaystr + "report.txt" ).write(object1, "utf-8" ) soapui
No comments:
Post a Comment