I am new to JMeter and the assertion concepts. I am encountering this error message when I attempted to execute a JMX file, containing assertions in JMeter:
Assertion error: false Assertion failure: true Assertion Failure Message: Test Failed: Variable(search result) not to equal / received: NOT FOUND [[[[]]]] comparison: NOT FOUND [[[[]]]]
The script is executed this way: $java -jar ./apache-jmeter-2.10/bin/ApacheJMeter.jar -t ./jmeter-master/test.jmx -Jhost=myhost.com -Joutput_suffix=localtest
I have attempted to drop the contents of database table in MySQL, repopulate them, and re-execute the jmx file. However, it is still failing with the same error message above.
The jmeter.log indicates only the following information below: 2013/11/27 05:58:52 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.OutOfMemoryError at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:284) at org.mozilla.javascript.DefiningClassLoader.defineClass(DefiningClassLoader.java:27) at org.mozilla.javascript.optimizer.Codegen.defineClass(Codegen.java:130) at org.mozilla.javascript.optimizer.Codegen.createScriptObject(Codegen.java:85) at org.mozilla.javascript.Context.compileImpl(Context.java:2394) at org.mozilla.javascript.Context.compileString(Context.java:1335) at org.mozilla.javascript.Context.compileString(Context.java:1324) at org.mozilla.javascript.Context.evaluateString(Context.java:1076) at org.apache.jmeter.control.IfController.evaluateCondition(IfController.java:110) at org.apache.jmeter.control.IfController.next(IfController.java:167) at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:214) at org.apache.jmeter.control.GenericController.next(GenericController.java:174) at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:223) at org.apache.jmeter.control.GenericController.next(GenericController.java:174) at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:214) at org.apache.jmeter.control.GenericController.reInitializeSubController(GenericController.java:274) at org.apache.jmeter.control.GenericController.reInitializeSubController(GenericController.java:275) at org.apache.jmeter.control.IfController.next(IfController.java:178) at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:214) at org.apache.jmeter.control.GenericController.next(GenericController.java:174) at org.apache.jmeter.control.LoopController.next(LoopController.java:118) at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:223) at org.apache.jmeter.control.GenericController.next(GenericController.java:174) at org.apache.jmeter.control.LoopController.next(LoopController.java:118) at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:223) at org.apache.jmeter.control.GenericController.next(GenericController.java:174) at org.apache.jmeter.control.LoopController.next(LoopController.java:118) at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:223) at org.apache.jmeter.control.GenericController.next(GenericController.java:174) at org.apache.jmeter.control.LoopController.next(LoopController.java:118) at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:88) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255) at java.lang.Thread.run(Thread.java:769)
This is message logged in the JTL file:
/</failureMessage>
</assertionResult>
</httpSample>
<httpSample t="436" lt="406" ts="1385112442588" s="true" lb="Homepage:Home" rc="200" rm="OK" tn="Thread Group 1-4" dt="text" by="238401" sc="1" ec="0" ng="6" na="6"/>
<httpSample t="111" lt="34" ts="1385112445679" s="false" lb="Search:Leads" rc="200" rm="OK" tn="Thread Group 1-2" dt="text" by="15237" sc="1" ec="1" ng="6" na="6">
<assertionResult>
<name>Check for found lead</name>
<failure>true</failure>
<error>false</error>
<failureMessage>Test failed: variable(searchResult) expected not to equal /
****** received : NOT_FOUND[[[]]]
****** comparison: NOT_FOUND[[[]]]
/</failureMessage>
</assertionResult>
</httpSample>
<httpSample t="138" lt="124" ts="1385112448413" s="false" lb="Search:Leads" rc="200" rm="OK" tn="Thread Group 1-4" dt="text" by="182785" sc="1" ec="1" ng="6" na="6">
<assertionResult>
<name>Check for found lead</name>
<failure>true</failure>
<error>false</error>
<failureMessage>Test failed: variable(searchResult) expected not to equal /
****** received : NOT_FOUND[[[]]]
****** comparison: NOT_FOUND[[[]]]
Here's the segment of the JMX file that was produced and executed:
<ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="Result Table" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>false</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>true</xml>
<fieldNames>false</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<threadCounts>true</threadCounts>
<sampleCount>true</sampleCount>
</value>
</objProp>
<stringProp name="filename">jmeter_output_${__P(output_suffix,generic)}.xml</stringProp>
</ResultCollector>
Can anyone please provide pointers on troubleshooting this error?
Thank you so much, Ari.