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

Running a Custom Python Load Test

By: RedLine13

RedLine13 offers users the ability to scale out custom python load tests in their own AWS environment. In this video, we demonstrate uploading and running a simple python test on RedLine13, showing how simple and cost-effective it is to run python load tests with RedLine13.

Getting Started

When running a custom python load test on RedLine13, we begin by logging into our account, hitting “Start Test”, and then navigating to the “Custom Test” tab.

One will need to prepare a python load test beforehand. Here we use an example test that can by found on our GitHub (login_load_test.py). This test simulates a user logging into Dictionary.com, hitting a few endpoints, and then we have the test generate a fake URL error.

To run this test, we first need to create a Dictionary.com account, which we then input said username and password into the test:

from load_testing_test import LoadTestingTest
import record_helpers
import time
import sys


class LoginLoadTest(LoadTestingTest):
    """Example testing a login page on dictionary.com. To play
    with this test create an account on dictionary.com and use
    your username+password in the definition above. The parent
    class documentation see:
    https://www.redline13.com/customTestDoc/class-LoadTestingTest.html
    """

    SITE_USERNAME = '<site_username>'
    SITE_PASSWORD = '<site_password>'

    def __init__(self, test_num, rand):
        """Constructor needs to pass up the information
        :param test_num: int Test number, if you if you specify simulate 40 users - this represents that user
        :param rand: string The rand is a token used to keep track of this test, not used, just pass to parent
        """

        super(LoginLoadTest, self).__init__(test_num, rand)

Configuring Parameters

Once we have created our test, we then upload the custom python load test to RedLine13 where we can then begin to edit certain parameters. Here we can edit the number of users, attach additional CSV files, and save our response output and percentiles (pro only). In this example we start out by simulating 20 users:custom-python-load-test-start

Next, we scroll down to expand the “Advanced Cloud Options” tab to fine tune our load test. Here we can control a range of parameters like the size and location of the EC2 instances we will be using. In this example we ran our test on two, m3.medium spot instances in California, with 10 users per server:

redline13-custom-python-load-test-advanced-settings

After we configure the parameters of our test, we are then are ready to start load testing. The servers begin to launch and our test begins shortly. Once completed, we are then redirected to the results page where we can analyze what happened during our test:

redline13-custom-python-load-test-results

The results page provides you with a breakdown of request metrics, response metrics, load agent metrics, errors, and agent metrics. In this example test we found that out of the 100 requests that were made, 99% were completed within the first 7.02 seconds of the 10 second load test.

Running a custom python load test on RedLine13 is as simple as uploading a file, configuring a few parameters, and then sitting back as the EC2 instances do all the work.

2017-01-23
Previous Post: Jenkins Plugin 2.1 Updates
Next Post: Running a URL Load Test

Recent Posts

  • Cost-Effective Cloud Load Testing
  • Guest Post: Load Testing with Locust and JMeter on RedLine13
  • Executing Gatling Tests with The SBT + Java RedLine13 Plugin
  • Selenium Load Testing: When and How
  • RedLine13 Basic vs Premium Subscription

Related

  • How to Run a Multi-Region Test – Available in Paid and Free Plans
  • Cost-Effective Cloud Load Testing
  • Guest Post: Load Testing with Locust and JMeter on RedLine13
  • Selenium Load Testing: When and How
  • Selecting Custom OpenJDK version for JMeter
  • Executing Gatling Tests with The SBT + Java RedLine13 Plugin
  • JMeter Alternatives: k6 and Gatling
  • RedLine13 Basic vs Premium Subscription
  • Speak the Lingo using Load Testing Terms
  • API Load Testing with cURL and RedLine13

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

Designed using Responsive Brix. Powered by WordPress.