Search

Friday, June 18, 2010

JMeter FAQ on testing web services

Q1: The "response data writer" output file remains empty after running my JMeter test.
  • Verify the location of your input xml file on your "Webservice (SOAP) Request" controller. The location might not be valid.
  • Check if the xml content in the soap body of your input file has a valid structure. Validate the xml against its XSD.
  • Have a look at the jmeter.log file in the \bin directory of JMeter. Usually JMeter logs an error when it encounters an unexpected exception.

Q2: After having changed the input xml file, JMeter seems to send the same old xml file content with its request.
  • Uncheck the "Memory Cache" option on the "Webservice (SOAP) Request" controller. By unchecking this option you make sure that the input xml file is read each time you send the webservice request.
Q3: JMeter doesn't take my "HTTP Request Defaults" settings into account.
  • Make sure you don't overwrite the default settings with the settings on your "Webservice (SOAP) Request". Any connection setting after your "HTTP Request Defaults" gets priority.
Q4: My JMeter test result passes while the server is not running.
  • This can happen when you don't check for the server response code. To avoid this, add a response assertion checking the response code and fill in value "200" to check for. Response code 200 means the request succeeded. Next time the server is down, your response assertion checking for the response code will make your test fail.
Q5: I get a "java.lang.NoClassDefFoundError: javax/mail/MessagingException" exception when sending the SOAP Webservice request.
  • Probably you are missing some libraries.

Do you know other solutions or tips and tricks for nasty JMeter problems? Add your comments in the post comment section and help other people having a better JMeter experience

No comments: