A conditional jump instruction routes the execution path of a business session based on API response parameters. Use conditional jump instructions to build dynamic stress testing scenarios where subsequent steps depend on earlier API results, such as verifying an account balance before proceeding to checkout.
How conditional jump instructions work
A conditional jump instruction sits between APIs in a business session. During a stress test, PTS evaluates the conditions you define and decides which API to execute next.
Actions
Each conditional jump instruction supports a default action and one or more condition-based actions. Three actions are available:
| Action | Behavior |
|---|---|
| Jump | Execute a specified API in the business session instead of the next one in sequence. You must specify the target API. |
| Continue | Proceed to the next API in sequence. If no subsequent API exists, the session ends. |
| End | Stop execution of the current business session immediately. |
Condition logic
| Scope | Logic | Behavior |
|---|---|---|
| Multiple conditions within one instruction | AND | PTS evaluates conditions in order. All conditions must be met for the associated action to trigger. |
| Multiple conditional jump instructions in the same session | OR | If multiple conditional jump instructions are configured in the same session, the action of the first instruction whose conditions are met is run. |
| No conditions met | Default action | If no conditions are met, the Default Action determines the next step. |
Example: E-commerce checkout flow
A typical e-commerce test scenario has four steps:
Log on to the system.
Top up the account balance.
Add a product to the shopping cart.
Complete the payment.
At the shopping cart step, the test must verify that the account balance was topped up before proceeding to payment. Place a conditional jump instruction after the "add product to shopping cart" API:
If the balance is topped up: Continue to the payment step.
If the balance is not topped up: Jump back to the "top up account balance" API.
This ensures the test flow mirrors real user behavior, where checkout only succeeds after a successful top-up.
Prerequisites
Before you begin, make sure that you have:
A PTS stress testing scenario with configured APIs. For details, see HTTP APIs
Response parameters configured for the API whose output the conditional jump instruction evaluates. For details, see API response parameters
Add a conditional jump instruction to a business session
Log on to the PTS console, choose , and then click PTS.
Add the APIs that make up the test flow. In the e-commerce example, add APIs for logging on, topping up, adding to cart, and completing payment.
Configure response parameters for any API whose output the conditional jump instruction will evaluate. In the e-commerce example, configure response parameters for the "top up account balance" API so that downstream conditions can check whether the top-up succeeded.

In the Business Session section, click the Add Instruction drop-down list and select Conditional Jump.
Expand Conditional Jump and configure the following settings:

Setting Description Default Action The action to take when no condition is met. Select Jump, Continue, or End. Select Session The API whose response parameters the condition evaluates. Action The action to take when all conditions in this group are met. If set to Jump, specify the target API. Add Condition Add a condition to the current group. Multiple conditions within one group follow AND logic. Place the configured Conditional Jump instruction after the appropriate API in the business session. In the e-commerce example, place it after the "add product to shopping cart" API.
Usage notes
Place a conditional jump instruction directly after the API whose outcome it evaluates. A misplaced instruction may produce unexpected routing.
When multiple conditions exist within one conditional jump instruction, all must be true (AND logic) for the associated action to run.
When multiple conditional jump instructions exist in the same session, the logical relationship between them is OR.
If no conditions are met across all conditional jump instructions, the Default Action determines the next step.
Related topics
HTTP APIs -- Add and configure APIs in a business session.
API response parameters -- Configure the response parameters that conditional jump instructions evaluate.