Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.

An offline tester to validate your custom Python RedLine13 Load Test.

Quick Start

git clone
cd harness-custom-test-python
python install

The project has a couple dependencies which should be installed with the command above. Alternatively they can be installed with pip

  • bs4
  • pycurl

Specify test on Command Line

  • python
  • python example_test
    • This opens module and looks for a subclass of LoadTestingTest

Specify configuration in loadtest.ini

You can also specify configuration data in loadtest.ini which is read in and provided to your class as a dict from self.get_ini_settings()

# used in sample load test to define iterations
# can define test to run example_test or
  • python

Examples Provided

  • CustomLoadTest,
    • Simple URL which does echo
  • ExampleTest,
    • Loops 100 times with random wait, each loop is a recorded as URL and overall a PAGE
  • FormLoadTest,
    • Gets data from a webpage, finds a form, and submits that form with data
  • LoginLoadTest,
    • Submits a login form (to use see code, need to add in data)
  • SimpleLoadTest,
    • Hits a URL, parses for other endpoints (JS, CSS) and times those as well

Simulating inputs for test

Modify loadtest.ini with parameters, in your custom test you can access settings via get_ini_settings. The object is a dict

from load_testing_test import LoadTestingTest
import record_helpers
import time
import random

class ExampleTest(LoadTestingTest):

    def start_test(self):
        """ Start test """

        # Example getting information from Config Dict
        config = self.get_ini_settings()
        iterations = 1
        if config.has_key( 'iterations' ):
            iterations = int(config.get( 'iterations', 1 ))

        start_user_time = time.time()

        for x in range(1, iterations):
            start_time = time.time()
            time.sleep(random.randint(2, 5))
            diff = time.time() - start_time
            record_helpers.record_load(x, start_time, diff)

        end_user_elapsed = time.time() - start_user_time
        record_helpers.record_load_time( "Overall", start_user_time, end_user_elapsed)

        return True


The load test will generate local information on performance results and errors.

More on Custom Performance Tests


RedLine13 load test harness for building custom python tests and testing locally







No releases published


No packages published