- Testsigma REST APIs
Manage Environments
Elements
Test Plans
Upload Files
Get Project Wide Information
Upload & Update Test Data Profile
Fetch Test Results (All Levels)
Trigger Multiple Test Plans
Trigger Test Plans Remotely & Wait Until Completion
Run the Same Test Plan Multiple Times in Parallel
Schedule, Update & Delete a Test Plan Using API
Update Test Case Results Using API
Create and Update Values of Test Data Profile Using REST API
Rerun Test Cases from Run Results using API
Salesforce Metadata Refresh Using API
Manage Test Steps Using API
Upload & Update Test Data Profile
The following article discusses about uploading and updating a test data profile using API. For more information on creating a test data profile refer to, create a test data profile.
Prerequisites
Before you begin, ensure that:
- You have referred to the documentationon generating API keys from Testsigma application.
- You have an XLS file.
Upload test data profile with REST API
This endpoint allows users to upload XLSX files into Testsigma using REST API.
| Request Type | POST |
|---|---|
| Endpoint | https://app.testsigma.com/api/v1/test_data/upload |
| Authorization | Bearer <API_Token> Same as the Testsigma API key mentioned above. |
| Request Body Type | Multipart form-data |
| Request Body (form data) | - file = @"<local_path>" - encryptedColumns = "Password" - applicationVersionId = "10" - name = "TestData01" - notificationEmail= "example@testsigma.com" |
| Response Body (JSON) | { "id": 78, "testDataName": "API 01", "testData": null, "data": null, "createdById": 10, "updatedById": 10, "columns": null, "createdDate": 1669806564576, "updatedDate": 1669806564576, "passwords": null, "versionId": 69, "isMigrated": null, "message": "We will send an email once the Test data profile is created successfully." } |
Request fields
file: The file location you want to upload.
encryptedColumns: Enter the columns you want to encrypt. Give “,” for each entry if you want to encrypt multiple columns.
applicationVersionId: The ID of the application version where the file is to be uploaded.
name: The name you want to give for the uploading test data profile.
notificationEmail: The email for which you want to get uploaded notification.
Response fields
Id: The ID of the Project where the file is to be uploaded. This can be found in Project settings by checking the URL.
For example, In the URL - https://app.testsigma.com/ui/projects/11/details, the Project ID is 11
testDataName: Name of the test data profile.
createdById/updatedById: User ID of the creator/updater
createdDate/updatedDate: Date when the asset is created/updated.
versionId: The ID of the application version where the file is to be uploaded.
For example, in https://app.testsigma.com/ui/projects/11/apps/25/versions/364/details URL, the version ID is 364.
message: the email which will be sent as notification for the uploaded file.
Update test data profile with REST API
This endpoint allows users to update test data profile in Testsigma using REST API.
| Request Type | POST |
|---|---|
| Endpoint | https://app.testsigma.com/api/v1/test_data/upload |
| Authorization | Bearer <API_Token> Same as the Testsigma API key mentioned above. |
| Request Body Type | Multipart form-data |
| Request Body (form data) | - file = @"<local_path>" - encryptedColumns = "Password" - applicationVersionId = "10" - name = "TestData01" - notificationEmail= "example@testsigma.com" |
| Response Body(JSON) | { "id": 77, "testDataName": "TD01", "testData": null, "data": null, "createdById": 9, "updatedById": 9, "columns": [ "description", "city", "man" ], "createdDate": 1669806346000, "updatedDate": 1669806369000, "passwords": null, "versionId": 69, "isMigrated": true, "message": "We will send an email once the Test data profile is created successfully." } |
Request fields
file: The file location you want to upload.
encryptedColumns: Enter the columns you want to encrypt. Give “,” for each entry if you want to encrypt multiple columns.
applicationVersionId: The ID of the application version where the file is to be uploaded.
name: The name you want to give for the uploading test data profile.
notificationEmail: The email for which you want to get uploaded notification.
Response fields
Id: The ID of the Project where the file is to be uploaded. This can be found in Project settings by checking the URL.
For example, In the URL - https://app.testsigma.com/ui/projects/11/details, the Project ID is 11
testDataName: Name of the test data profile you want to update.
createdById/updatedById: User ID of the creator/updater
columns: The columns you're updating in test data profile.
createdDate/updatedDate: Date when the asset is created/updated.
versionId: The ID of the application version where the file is to be uploaded.
For example, in https://app.testsigma.com/ui/projects/11/apps/25/versions/364/details URL, the version ID is 364.
message: the email which will be sent as notification for the uploaded file.