Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
244 views
in Technique[技术] by (71.8m points)

Need to compare two xml in while loop controller of Jmeter

I am adding below condition in while loop to compare two xml with limit to its repetition

${__javaScript(("${checkstatus}".indexOf("${check_satus_assertion}")==-1 )&& (${count}<=2))} 

but its giving below error

2021-01-28 17:08:18,448 ERROR o.a.j.f.JavaScript: Error processing Javascript: [("<SOAP- ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP- ENV:Header/><SOAP-ENV:Body><ns:StatusResponse xmlns:ns="http://abcd.com/schema/wsdl/ASGSimpleMsgSvc/1.0.0"><MessageWrapper> <MessageId>6c6e5146-7cf2-4682-b43b-2c8a9b6766f0</MessageId> <MessageStatus>Failed</MessageStatus><MessageStatusDesc>Data Validation</MessageStatusDesc><MessagePayloadSchema>A&amp;S</MessagePayloadSchema> <MessagePayloadVersion/><MessagePayload><![CDATA[<?xml version="1.0" encoding="UTF-8"?> <Package> <Workflow> <Reference>6c6e5146-7cf2-4682-b43b-2c8a9b6766f0</Reference> <CorrectionIndicator>first_submission</CorrectionIndicator> <Operation>SubmitWorkOrder</Operation> <Status>Failed</Status> <TechnicalStatus>Data Validation</TechnicalStatus> <Details>FileName cannot be Empty</Details> <URL>https://abcd/#/home/messages/message/1531332/summary</URL> </Workflow> </Package> ]]></MessagePayload></MessageWrapper></ns:StatusResponse></SOAP-ENV:Body></SOAP- ENV:Envelope>".indexOf("<Status>Failed</Status> <TechnicalStatus>Data Validation</TechnicalStatus> <Details>FileName cannot be Empty</Details>")==-1 )&& (2<=2)] javax.script.ScriptException: <eval>:4:18 Missing space after numeric literal <Reference>6c6e5146-7cf2-4682-b43b-2c8a9b6766f0</Reference> ^ in <eval> at line number 4 at column number 18
question from:https://stackoverflow.com/questions/65936456/need-to-compare-two-xml-in-while-loop-controller-of-jmeter

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...