Create a Scenario
The scenario defines the set of steps that agents will run when executing a load test as well as the timing in between those steps.
For example a scenario for an HTTP based REST API might involve:
- Send
GET /
tohttp://mywebsite.com/api
- Wait 100ms for a reply, check the status code to ensure a
200 OK
.
There are a numerous ways to define a scenario:
- JMeter Test Plan: JMeter, a popular source tool, can be used to define the scenario. Then simply use Testable to execute that test plan at scale.
- Gatling Simulation: Gatling, a Scala DSL based open source tool, can be used to define the scenario. Then simply use Testable to execute that simulation at scale.
- Locust test: Locust, a Python based open source tool, can be used to define the scenario. Then simply use Testable to execute at scale.
- Node.js script: Write a script using the Javascript language running within a sandboxed Node.js environment to execute more complex scenarios. You can start from scratch or convert a Recording into a script as a starting point.
- Java code: Each vritual user runs your Java code (main class, JUnit, TestNG). Upload JARs or let Testable build your project via Maven/Gradle.
- Puppeteer script: Each virtual user will run a Puppeteer script.
- Playwright library script: Each virtual user will run a Playwright library script.
- Playwright test project: Each virtual user will run your Playwright Test project.
- Webdriver.io script: Write a Webdriver.io Selenium script for Nodejs. Each virtual user runs wdio against a test runner local selenium instance.
- Selenium Javascript code: Write Selenium Javascript code. Each virtual user runs this code in Node.js against a test runner local selenium instance.
- Selenium Java code: Write Selenium Java code. Each virtual user runs the Java code on a JVM against a test runner local selenium instance.
- Serenity BDD project: Upload a Serenity BDD project. Each virtual user will run the Serenity tests on a JVM against a test runner local selenium instance.
- OpenFin application via Webdriver.io: Test an OpenFin application using any of the supported Selenium bindings. Each virtual user will launch the OpenFin application with Chromedriver running locally on the test runner.
- OpenFin application via Puppeteer: Test an OpenFin application via Puppeteer. Each virtual user will launch the OpenFin application with Puppeteer running locally on the test runner.
- Postman collection: Reuse a Postman collection as your test scenario. Each virtual user will launch the Postman runtime to run the steps in your Postman collection.
- Replay a HAR file: Each virtual user replays a HAR file.
- Load Url: The simplest option. Ask Testable to either HTTP GET your URL or simulate loading your URL in a Chrome browser.
- Protractor script: Write a Protractor script. Each virtual user runs protractor against a test runner local selenium instance.
- PhantomJS or SlimerJS script: Write a script for PhantomJS, a headless WebKit browser implementation or for SlimerJS a headless Gecko (Firefox) browser implementation.
- Recording: Testable will dynamically generate a URL that you can use to record all traffic to and from your service as you use the gateway URL (i.e. a recording man in the middle proxy).
Scenario Parameters
Scenario parameters allow you to parameterize your scenario and share it across multiple test configurations. See our scenario parameters guide for more details.