jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Lee <>
Subject file comparison
Date Thu, 18 Dec 2008 14:42:26 GMT
I would like to compare a part of a file to a given string. We have a web application that
calls web services. It generates a log file of the send and receive xml messages. I would
like to take one of these log files and create a test case from it where I can take each xml
send message and use it to compare it to the receive xml log file. We cant use the web service
request because I have to compare based upon what our application sends. That involves comparing
the files. I can't seem to do 'contains' because it wants a regular expression and I have
this huge xml. I use an HTTP Request and use the FILE protocol and load the file. I use a
response assertion to try to compare an xml section from what the send or receive data should
look like in the log files.

I put on the 'substring' check box and put something like this in the 'patterns to test'

                <VAR NAME="RESULTS">DPR0007</VAR>
                <VAR NAME="SERVERTIMESPENT">0.000</VAR>
                <ROWSET NAME="DPR0007">
                    <ROW NUM="1">
                        <VAR NAME="INIGROUP">WipData</VAR>
                        <VAR NAME="INIOPTION">Path</VAR>
                <ROWSET NAME="ERRORS">
                    <ROW NUM="1">
                        <VAR NAME="CODE">DPR0007</VAR>

but it doesnt work.
If I break up each line and put it in and do a 'contains' then it does. Problem with that
is order doesn't matter and these are big files and I need to be able to compare a chunk of
data as above.

Summary: How do I check if a multi-line string exists in a file?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message