Skip to content
  • ZipCode Api
  • Blog
  • About RedLine13
RedLine13
RedLine13
Primary Navigation Menu
Menu
  • Start Testing
  • Demo
  • Pricing
  • JMeter
  • Partners
  • Docs
    • Documentation Home
    • AWS Set Up for load testing
    • AWS Approval for Large Tests
    • PHP, NodeJS, Python Load Tests
    • Scalability
    • Jenkins Plugin Setup
    • Premium Features
    • Knowledge Base

Handling Failures in your Custom Test Script

By: Rich Friedman

When writing a Custom test script, you need to add the ability to handle errors.  Otherwise, the test script will cause that client to fail.

This happens frequently because the request failed by receiving no response or timing out.  Once it fails, that user test stops.

If you want to continue after an error, you should wrap the goToUrl call in a try/catch. In the catch, add something like:

catch (Exception $e) {
  // Record error
  $msg = $e->getMessage();
  recordError($msg ? $msg : 'Unknown error');
}

2013-11-15
Previous Post: Spot Instance Availability & Test Startup Errors
Next Post: Load Agent CPU Load

Recent Posts

  • JMeter XML Format Post Processor
  • Order of Elements in JMeter
  • The JMeter Synthesis Report
  • Using the JMeter Plugins Manager
  • JMeter Rotating JTL Listener

Related

  • JMeter XML Format Post Processor
  • Order of Elements in JMeter
  • The JMeter Synthesis Report
  • Using the JMeter Plugins Manager
  • JMeter Rotating JTL Listener
  • Using Test Fragments in JMeter Tests
  • Step-by-Step Guide to Testing with JMeter
  • Functional Testing vs Performance Testing
  • A Gentle Introduction to Load Testing
  • Using the JMeter Counter Element

© RedLine13, LLC | Privacy Policy | Contract
Contact Us: info@redline13.com

Designed using Responsive Brix. Powered by WordPress.