Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the following docs as per new UI #302

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
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
47 changes: 33 additions & 14 deletions src/pages/docs/api/test-plans.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Trigger Test Plans remotely"
title: "Trigger Test Plans Remotely"
page_title: "Trigger Test Plans remotely using Testsigma"
metadesc: "How to trigger Test Plan Execution remotely using Testsigma REST API Endpoints, which is useful when you want to fully automate continuous testing within your CI/CD pipeline"
noindex: false
Expand All @@ -9,6 +9,9 @@ warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Prerequisites"
url: "#prerequisites"
- type: link
name: "Test Plan - Start Test Execution API"
url: "#test-plan---start-test-execution-api"
Expand All @@ -22,15 +25,19 @@ contextual_links:

---


You can use Testsigma API to trigger test executions remotely. This is useful when you want to fully automate continuous testing within your CI/CD pipeline, and have already integrated Testsigma with a CI tool you use, such as Jenkins, TravisCI, GitLab, Codeship, CircleCI, etc..

You should be familiar with creating and running Test Plans. See [Manage Test Plans](https://testsigma.com/docs/test-management/test-plans/overview/)
---

## **Prerequisites**

- You should be familiar with creating and running Test Plans. See [manage test plans](https://testsigma.com/docs/test-management/test-plans/overview/)
- You should have Testsigma API key. See [how to generate API keys](https://testsigma.com/docs/configuration/api-keys/).

[[info | NOTE:]]
| You need to authenticate these requests with your Testsigma API Key. See [How to generate API Keys](https://testsigma.com/docs/configuration/api-keys/)

---
##**Test Plan - Start Test Execution API**
## **Test Plan - Start Test Execution API**
This endpoint allows users to trigger a Test Plan execution remotely.

|**Request Type**| POST |
Expand Down Expand Up @@ -78,8 +85,9 @@ This endpoint allows users to trigger a Test Plan execution remotely.
- **test\_step\_prerequisite\_fail:** Action to perform on Test Step prerequisite failure

- **totalQueuedCount:** Total number of queued tests
- Get Device ID from the **Test Development > Test Plan Details page >Test Devices**
![Device ID from Test Plan Details Page](https://docs.testsigma.com/images/api/test-plans/test-plan-device-id.png)



- Execution Config name and ID are the saved configurations for [Partial Test Plan Runs](https://testsigma.com/docs/runs/test-plan-executions/#partial-test-runs).
- In the POST request, you can either use the name or the ID for the Execution Config.
- Get the Execution Config ID and name via this GET Request: https://testsigma.com/docs/api/test-plans/#get-test-plan-favouritesconfig
Expand All @@ -89,7 +97,7 @@ This endpoint allows users to trigger a Test Plan execution remotely.

For a Test Plan, you can get the **Test Plan ID** and the complete **cURL request** to trigger the execution from the Test Plan Details page:

![Test Plan detains inside the CICD tab of a test plan](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/api/test-plans/testplan-cicd-tab-rest-api-updated.png)
![Test Plan detains inside the CICD tab of a test plan](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/rapitestplan.png)

The Run ID is returned as ‘id’ in the response for the request if the execution was started successfully.

Expand All @@ -103,20 +111,26 @@ Each Test Plan Run in Testsigma has a unique Run ID. This Run ID can be used to
| You need to authenticate these requests with your Testsigma API Key. See [How to generate API Keys](https://testsigma.com/docs/configuration/api-keys/)

---
##**Obtaining the Run ID**


## **Obtaining the Run ID**

If the Test Plan Run was started from within the Testsigma App, the Run ID can be found from the Run Results page as shown below:

![run ids that can be used to trigger test plans in Testsigma](https://docs.testsigma.com/images/test-plans/run-ids-trigger-test-plans.png)
![Run IDs](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/rapitpbid.png)

The values from 295 to 302 are Run IDs of consecutive Test Plan Runs.
The values from 295 to 299 are Run IDs of consecutive Test Plan Runs.

If the Test Plan was started by the Test Plan Trigger API Call, the Run ID can be obtained from the API Response under the JSON key ‘id’.

![run ids from API response under the json key id](https://docs.testsigma.com/images/test-plans/run-id-api-response-json-key.png)



---
##**Test Plan Status API**


## **Test Plan Status API**

This endpoint allows users to check the status of an already triggered Test Plan Run.

Expand Down Expand Up @@ -173,7 +187,7 @@ The Response contains a lot of information regarding the Test Plan Run. Here’s

![example of a json response](https://docs.testsigma.com/images/test-plans/example-json-response.png)

You can see the result as FAILURE and the current status as STATUS\_COMPLETED (along with other information).
You can see the result as **FAILURE** and the current status as **STATUS\_COMPLETED** (along with other information).

---

Expand All @@ -188,6 +202,10 @@ This endpoint allows users to get all the Test Plan Favourites/Config that have
|**Authorization**|Bearer <api\_token><br>The <api\_token> is the same as the Testsigma API key mentioned above.|
|**Response Body**|[<br>{<br>&emsp;&emsp;&emsp;&emsp;"id": 2,<br>&emsp;&emsp;&emsp;&emsp;"name": "rest conf inc 1",<br>&emsp;&emsp;&emsp;&emsp;"query": "[{\"key\": \"suiteId\", \"value\": [114], \"operation\": \"NOT_IN\"}]",<br>&emsp;&emsp;&emsp;&emsp;"executionConfigType": "SAVED_CONFIG",<br>&emsp;&emsp;&emsp;&emsp;"executionConfigCondition": "EXCLUDED",<br>&emsp;&emsp;&emsp;&emsp;"createdByUser": null<br>&emsp;&emsp;},<br>&emsp;&emsp;{<br>&emsp;&emsp;&emsp;&emsp;"id": 3,<br>&emsp;&emsp;&emsp;&emsp;"name": "plan o1 exclude 2",<br>&emsp;&emsp;&emsp;&emsp;"query": "[{\"key\": \"suiteId\", \"value\": [132, 130], \"operation\": <br>\"NOT_IN\"}]",<br>&emsp;&emsp;&emsp;&emsp;"executionConfigType": "SAVED_CONFIG",<br>&emsp;&emsp;&emsp;&emsp;"executionConfigCondition": "EXCLUDED",<br>&emsp;&emsp;&emsp;&emsp;"createdByUser": {<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"id": 9,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"email": "[email protected]",<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"firstName": "Bhanu",<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"lastName": "prakash",<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"userName": "bhanu",<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"status": "Active",<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"isDeleted": false,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"isAdmin": true,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"isSuperAdmin": true,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"userType": null,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"isAPIUser": false,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"isCrowdUser": false,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"isMasked": false,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"gdpr": false,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"createdDate": 1657951985000,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"updatedDate": 1657951992000,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"createdById": null,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"updatedById": 9,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"privileges": [],<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"authType": null,<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"identityServiceId": "7308"<br>&emsp;&emsp;&emsp;&emsp;}<br>&emsp;&emsp;},<br>&emsp;&emsp;{<br>&emsp;&emsp;&emsp;&emsp;"id": 4,<br>&emsp;&emsp;&emsp;&emsp;"name": "update inc to exc 2 suites to 3 suites",<br>&emsp;&emsp;&emsp;&emsp;"query": "[{\"key\": \"suiteId\", \"value\": [132, 131, 130], \"operation\": \"NOT_IN\"}, {\"key\": \"reviewedBy\", \"value\": [9], \"operation\": \"NOT_IN\"}, {\"key\": \"assignee\", \"value\": [9], \"operation\": \"NOT_IN\"}]",<br>&emsp;&emsp;&emsp;&emsp;"executionConfigType": "SAVED_CONFIG",<br>&emsp;&emsp;&emsp;&emsp;"executionConfigCondition": "EXCLUDED",<br>&emsp;&emsp;&emsp;&emsp;"createdByUser": null<br>&emsp;&emsp;}<br>]<br>|


---


## **Test Case Execution details using REST API**
This endpoint allows users to get details of all Test case executions using REST API.

Expand All @@ -196,4 +214,5 @@ This endpoint allows users to get details of all Test case executions using REST
|**Endpoint**|https://app.testsigma.com/api/v1/execution_results/986/test_case_results|
|**Authorization**|Bearer **<API\_Token>**<br>Same as the Testsigma API key mentioned above.|
|**Request Body**|<pre>{ <br> "executionId": 268,<br> "executionResultId": 986,<br> "result": "FAILURE",<br> "status": "STATUS_COMPLETED",<br> "testCases": [<br> {<br> "testCaseId": 413,<br> "testCaseName": "03 data driven small",<br> "testCaseResultId": 7975,<br> "result": "FAILURE",<br> "isDataDrivenCase": true,<br> "iterationResults": [<br> {<br> "iterationResultId": 7963,<br> "setName": "examples",<br> "result": "SUCCESS"<br> },<br> {<br> "iterationResultId": 7976,<br> "setName": "travels",<br> "result": "FAILURE"<br> },<br> {<br> "iterationResultId": 7965,<br> "setName": "examples 1",<br> "result": "FAILURE"<br> }<br> ],<br> "testSuiteId": 197,<br> "testSuiteName": "02 DD Small",<br> "testSuiteResultId": 2295,<br> "machineId": 414,<br> "machineTitle": "machine 2",<br> "machineResultId": 2370<br> }<br> ]<br> }<pre>|
---

---
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Recording Test Steps: An Overview"
metadesc: "How to record test steps using Testsigma’s step recorder chrome extension."
metadesc: "This article discusses how to use the recorder to record your test steps and generate automated tests for web apps | Record Test Steps with Recorder for Web Apps"
noindex: false
order: 4.511
page_id: "Recording Test Steps: An Overview"
Expand All @@ -12,68 +12,61 @@ contextual_links:
name: "Prerequisites"
url: "#prerequisites"
- type: link
name: "Recording test steps using Testsigma’s step recorder chrome extension"
url: "#recording-test-steps-using-testsigmas-step-recorder-chrome-extension"
name: "Recording Test Steps Using Recorder"
url: "#recording-test-steps-using-recorder"
---

---

Testsigma Step Recorder chrome extension lets you *generate* automated test scripts from a series of manual actions you take to play out a test scenario. The automated test scripts can then be run on all the available Web Browsers.

&emsp;
Testsigma recorder allows you to record your interactions with the application as test steps. This article discusses recording test steps for Web applications using the recorder.


---
##**Prerequisites:**

This document will take you through the process of creating test steps using the Testsigma Step Recorder. You should already know how-to, or have:
## **Prerequisites**

1. [Testsigma step recorder chrome extension](https://testsigma.com/docs/test-step-recorder/install-chrome-extension/).
2. [create a Test case.](https://testsigma.com/docs/test-cases/manage/add-edit-delete/)
- You should know how to [create test cases](https://testsigma.com/docs/test-cases/manage/add-edit-delete/).

&emsp;
- You should know how to [create test steps using the recorder](https://testsigma.com/docs/test-cases/create-steps-recorder/android-apps/overview/).

---
##**Recording test steps using Test recorder**

1. Create a new Test Case in your Testsigma project.
2. Enter the Application URL that you want to automate and click on the 'Create’ button.
(This will add ‘Navigate to’ as the first test step.)

![test case page with navigate step in Testsigma](https://docs.testsigma.com/images/web-apps/test-case-page-with-navigate-step-testsigma.png)
## **Recording Test Steps Using Recorder**


1. Navigate to **Create Tests > Test Cases**, and click on **Create Test Case**.
![Test Cases](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/warnavctstcswa.png)


2. Create a test step using the URL that you want to automate and click on **Create Step**.
![Create Step](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/warcs.png)


3. Click on **Record**.
![Record](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/warrecord.png)


4. A new window will open the given URL and you can record the test steps.
![New Window](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/warnwindow.png)

3. Click on the Record button on the top right corner to start recording.

![record button on test case details page in Testsigma](https://docs.testsigma.com/images/web-apps/record-button-test-case-details-page-testsigma.png)
[[info | **NOTE**:]]
| Please wait a few seconds until the web page is fully loaded so the extension can collect information from the page in the background.

&emsp;
5. Once the first web page is fully loaded, start interacting and performing actions on the page.

A new Chrome window will open on your workstation. You are ready to record the Test Steps now.

[[info | Note:]]
| Please wait a few seconds until the Web Page is fully loaded so that the extension can profile the page in background.

1. Once the first Web page is fully loaded, start interacting and performing actions on the page.

2. Highlight the required element by hovering over the element first.

3. Once the correct element is highlighted, perform the action you want to record.

4. Repeat steps 2 and 3 for all the actions you want to record. The steps performed by you will be recorded in the background and added to the Test Case in Testsigma.
You may perform actions like Click on the element, Type value into the element e.t.c.
6. The actions will be recorded and added to the test case in the background.

![hover over an element to record it in Testsigma via test step recorder](https://docs.testsigma.com/images/web-apps/hover-over-element-to-record-testsigma.png)

5. Once the required actions are complete, switch back to the Testsigma Test Case page to see the recorded steps.
7. Once the required actions are complete, click on **Done** to switch back to the test case details page.
![Done](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/warcodone.png)

![sample test case via test step recorder in Testsigma](https://docs.testsigma.com/images/web-apps/test-step-recorder-sample-test-case-testsigma.png)
8. You can see the steps recorded in the test case details page.
![Test Steps](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/warrcst.png)

6. Rename the Elements if needed.

7. Perform a dry run to check the correctness of the Test Steps and modify or delete unwanted steps if any.
[How to perform Dry Run to verify Test Case is correct](https://testsigma.com/docs/runs/dry-runs-on-local-devices/)

8. Check the Test Results to find the issues, fix the issues, and repeat until the Test Case is passed.

9. Finally, add Assertions or verification steps as required.

Here's a quick GIF demonstrating creating test steps using the recorder.

![Record Test Steps for WebApps](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/RecordStepswappsWF.gif)
Loading