Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions src/pages/docs/test-plans/partial-test-plan-run-via-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,44 @@ Follow these steps to run the partial test plan via API call:
|**Endpoint**|<a href="https://app.testsigma.com/api/v1/execution_results" rel="nofollow">https://app.testsigma.com/api/v1/execution_results</a>|
|**Authorization**|Bearer Token &#8594 **<API_Token>**<br>Same as the Testsigma API key mentioned above.|
|**Request Body Type (JSON)**|Raw|
|**Payload**|{<br>&emsp;&emsp;"executionId": "3857",<br>&emsp;&emsp;"executionConfig": {<br>&emsp;&emsp;&emsp;&emsp;"name": "fav\_config\_name"<br>&emsp;&emsp;}<br>}|
|**Payload**|{<br>&emsp;&emsp;"executionId": "3857",<br>&emsp;&emsp;"executionConfig": {<br>&emsp;&emsp;&emsp;&emsp;"name": "fav\_config\_name",<br>&emsp;&emsp;&emsp;&emsp;"id": config\_id<br>&emsp;&emsp;}<br>}|

- Find the execution ID of your test plan in the Test Plan details and replace **3857** with it.
- Replace the name of the saved favorite configuration with **fav\_config\_name**.
- Replace **config\_id** with the ID of the saved favorite configuration.
Comment on lines +78 to +82

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n --hidden -S 'executionId|executionConfig\.id|config_id' src/pages/docs/test-plans

Repository: testsigmahq/testsigma-docs

Length of output: 1207


🏁 Script executed:

cat -n src/pages/docs/test-plans/partial-test-plan-run-via-api.md | sed -n '78,85p;148,168p'

Repository: testsigmahq/testsigma-docs

Length of output: 2719


Align ID types in API payload examples

The two payload examples currently use inconsistent formats for executionId:

  • The run example uses a string: "3857"
  • The schedule example uses a number: 3857

Both examples also use the unquoted placeholder config_id for executionConfig.id. Ensure both examples match the API's expected JSON type (string vs. number) for consistency and correctness.

Current Inconsistencies

Lines 78 vs 151:

// Current state - Run example
"executionId": "3857",
"executionConfig": { ... "id": config_id }

// Current state - Schedule example
"executionId": 3857,
"executionConfig": { ... "id": config_id }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/docs/test-plans/partial-test-plan-run-via-api.md` around lines 78 -
82, The API payload examples for partial test plan runs use inconsistent ID
types, so update both examples in the docs to match the expected JSON schema. In
the examples near the executionId payloads, make the run and schedule snippets
use the same type for executionId (either both string or both number, consistent
with the API) and ensure executionConfig.id is also shown with the correct JSON
type instead of an unquoted placeholder. Keep the placeholder values aligned
across the examples so the documentation is internally consistent.


[[info | NOTE:]]
| Using the correct execution ID and favorite configuration name in the API call payload is essential to ensure accurate execution.

### **Fetch the Execution Config ID from the App**

If you cannot use the GET API to retrieve the Execution Config ID, fetch it directly from the app using your browser's developer tools.

1. Open the test plan in Testsigma.

2. Right-click anywhere on the page and select **Inspect**.

3. Select the **Network** tab in the developer tools panel.

4. Select **Preserve log**.

5. Select **Disable cache**.

6. Clear existing log entries.

7. In the Network search bar, enter: **method:POST**

8. Select **Run** on the Partial Run configuration you want to trigger.

9. In the Network tab, open the POST request that appears.

10. Select the **Payload** tab.

11. Copy the **id** value from the payload.

[[info | NOTE:]]
| This **id** is the Execution Config ID. Pass it in the **executionConfig** object of your API request body.

---

## **Configure Schedule Partial Test Plan Run**
Expand Down Expand Up @@ -118,7 +148,7 @@ Follow these steps to schedule a partial test run via API call.
|**Endpoint**|<a href="https://app.testsigma.com/api/v1/schedule_executions" rel="nofollow">https://app.testsigma.com/api/v1/schedule_executions</a>|
|**Authorization**|Bearer Token &#8594 **<API_Token>**<br>Same as the Testsigma API key mentioned above.|
|**Request Body Type (JSON)**|Raw|
|**Payload**|{<br>&emsp;&emsp;&emsp;&emsp;"name": "RandomTest3",<br>&emsp;&emsp;&emsp;&emsp;"executionId": 3857,<br>&emsp;&emsp;&emsp;&emsp;"scheduleType": "ONCE",<br>&emsp;&emsp;&emsp;&emsp;"status": "ACTIVE",<br>&emsp;&emsp;&emsp;&emsp;"nextInterval": "2023-06-01T17:30:00.000Z",<br>&emsp;&emsp;&emsp;&emsp;"executionConfig": {<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"name": "fav\_config\_name"<br>&emsp;&emsp;&emsp;&emsp;},<br>&emsp;&emsp;&emsp;&emsp;"timezone": "IST"<br>}|
|**Payload**|{<br>&emsp;&emsp;&emsp;&emsp;"name": "RandomTest3",<br>&emsp;&emsp;&emsp;&emsp;"executionId": 3857,<br>&emsp;&emsp;&emsp;&emsp;"scheduleType": "ONCE",<br>&emsp;&emsp;&emsp;&emsp;"status": "ACTIVE",<br>&emsp;&emsp;&emsp;&emsp;"nextInterval": "2023-06-01T17:30:00.000Z",<br>&emsp;&emsp;&emsp;&emsp;"executionConfig": {<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"name": "fav\_config\_name",<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"id": config\_id<br>&emsp;&emsp;&emsp;&emsp;},<br>&emsp;&emsp;&emsp;&emsp;"timezone": "IST"<br>}|

### **Request Body Fields**

Expand All @@ -132,7 +162,7 @@ Follow these steps to schedule a partial test run via API call.

- **nextInterval**: Modify the time value in the schedule section to specify the desired time for the partial test run execution. Use the ISO 8601 format, such as **YYYY-MM-DDTHH:MM:SSZ**.

- **executionConfig**: Enter the name of the saved configuration in the executionConfig field. Replace **fav\_config\_name** with the name of the saved favorite configuration.
- **executionConfig**: Enter the details of the saved configuration in the executionConfig field. Replace **fav\_config\_name** with the name of the saved favorite configuration, and replace **config\_id** with the ID of the saved favorite configuration.

- **timezone**: Specify the timezone for the scheduled execution.

Expand Down
Loading