Skip to content

Commit

Permalink
Updated the following docs as per new UI
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathk08 committed Dec 5, 2023
1 parent f6211d2 commit d5d5685
Show file tree
Hide file tree
Showing 16 changed files with 502 additions and 392 deletions.
6 changes: 6 additions & 0 deletions src/left-nav-title.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,5 +595,11 @@
},
"ios-apps":{
"/docs/elements/ios-apps/overview/": "iOS Apps"
},
"after-test":{
"/docs/test-management/test-plans/after-test/": "AfterTest Case"
},
"partial-test-plan-run-via-api":{
"/docs/test-management/test-plans/partial-test-plan-run-via-api/": "Execute Partial Test Plans via API"
}
}
31 changes: 27 additions & 4 deletions src/pages/docs/addons/ocr-extraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,57 @@ contextual_links:
url: "#using-ocr-addon-in-a-test-case"
---

<br>

---

In this article, we will discuss how to create an addon for OCR text extraction. The creation part for the addon is similar except we set a class that implements the OCR interface.


## **Prerequisites**

- To know about the prerequisites for addons, refer to [prerequisites for creating an add-on](https://testsigma.com/docs/addons/pre-requisite-to-create-addon/).

- To know how to create an addon, refer to [create a Testsigma addon](https://testsigma.com/docs/addons/create/).

<br>
---

## **Update the Action Code**

1. Unzip the downloaded zip file and open the extracted folder in your favorite IDE as a Java module. This Java module contain the following template files which need to be updated:
![Folder](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/folder.png)

- **pom.xml:** Contains all your dependencies needed to code your functionality.

- **src folder:** Sample source java files with sample add-on functions.


2. From your IDE, import the downloaded Java module as Maven/Gradle.


3. The Template Java module contains all necessary dependencies required to develop an Addon. For OCR Text Extraction action, you can add the following to pom.xml.
![OCR code update](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ocr.png)

---

## **Overview of the method to extract text**

- ***extractTextFromPage():*** This method will extract text from an entire page.

- ***extractTextFromImage(OCRImage image):*** This method will extract text from a specified OCRImage object.

- ***extractTextFromElement(Element element):*** This method will extract text from a specific Element object.

[[info | **NOTE**:]]
| All three methods mentioned above will return a List of OCRTextPoint objects, which represent the location of the text within the source.

---


## **Using OCR Addon in a Test case**
Once you publish the addon, the NLPs will be available in the application. Refer to the gif below to learn how to use the NLP in the Test Cases.

![Addon GIF](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ocrtc.gif)
Once you publish the addon, the NLPs will be available in the application. Example NLP, 'Click on the ***Element*** by the text ***test-data***'.




---
15 changes: 9 additions & 6 deletions src/pages/docs/api/examples/trigger-multiple-test-plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ contextual_links:

---

This article explains how to trigger multiple Test Plans consecutively. You might need this to run a Mobile Test Plan after executing a Web Test Plan.
This article explains how to trigger multiple test plans consecutively. You might need this to run a mobile test plan after executing a web test plan.

---

## **Sample Test Scenario**

Let’s create a User using the Admin HR portal that is accessible only via a Desktop Browser and then manage that user on the Mobile HR App.
Expand Down Expand Up @@ -55,14 +56,16 @@ For example, if there’s a username that you would pass from Admin-TP to Mobile

Here’s a sample Request Body for passing runtime parameters:

```
{
"executionid": "274",
"runtimeData": {
"data": "$|admin_username|"
}
}
```

&emsp;&emsp;&emsp;&emsp;"runtimeData" : {<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"data":"$|admin_username|"
<br>&emsp;&emsp;&emsp;&emsp;}<br>}

Here’s a snapshot of the REST API Step in TCTrigger used to trigger the Mobile-TP Test Plan:

![Testsigma REST API Step to trigger new Test Plan](https://docs.testsigma.com/images/trigger-multiple-test-plans/trigger-multiple-test-plans-testsigma-rest-api-step.png)

Once the Test Plan Mobile-TP is triggered by the REST API Step in TCTrigger, the runtime parameter ‘admin\_username’ is also passed to that Test Plan. You can use those parameters in any Test Case within Mobile-TP now.

Expand Down
52 changes: 31 additions & 21 deletions src/pages/docs/continuous-integration/aws-devops.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: " Integrate Testsigma with AWS DevOps"
title: "Integrate Testsigma with AWS DevOps"
metadecs: "This article discusses step-by-step instructions for integrating Testsigma application with AWS DevOps | Learn how to integrate AWS DevOps with Testsigma Application"
order: 12.15
page_id: "Integrate Testsigma with AWS DevOps"
Expand All @@ -16,38 +16,41 @@ contextual_links:

AWS services that are used as a part of CI/CD pipeline are:

**CodeCommit:** AWS CodeCommit is a version control service that enables you to privately store and manage Git repositories in the AWS cloud.<br>
- **CodeCommit:** AWS CodeCommit is a version control service that enables you to privately store and manage Git repositories in the AWS cloud.

**CodeBuild:** CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy.<br>
- **CodeBuild:** CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy.

**CodeDeploy:** AWS CodeDeploy is a deployment service that enables developers to automate the deployment of applications to instances and to update the applications as required.
- **CodeDeploy:** AWS CodeDeploy is a deployment service that enables developers to automate the deployment of applications to instances and to update the applications as required.

This article discusses how to integrate Testsigma with AWS DevOps.

---

## **AWS DevOps integration methods:**

Below are the 2 methods to integrate and trigger Testsigma tests via AWS DevOps:

* Go to CodeBuild Services, Create a Build Project, and Start a Build using your repository.
* Create CodePipeline with Source, Build, and Pipeline details.
- Go to CodeBuild Services, Create a Build Project, and Start a Build using your repository.

- Create CodePipeline with Source, Build, and Pipeline details.
We’ll cover both methods.



### **Go to CodeBuild Services, Create a Build Project, and Start a Build using your repository:**


1. Click on the Build projects option under the Build section and Create a new Build Project:
![create build project button in AWS Devops](https://docs.testsigma.com/images/aws-devops/create-build-project-aws-devops.png
)
![create build project button in AWS Devops](https://docs.testsigma.com/images/aws-devops/create-build-project-aws-devops.png)


2. Fill in the project configuration details and select the Source Provider and Repository accordingly. Here we have selected Github as our repository and give Buildspec name as your .yml file name

![project configuration details in AWS DevOps](https://docs.testsigma.com/images/aws-devops/project-configuration-details-aws-devops.png)
![add yml file in buildspect in AWS DevOps](https://docs.testsigma.com/images/aws-devops/buildspec-yml-aws-devops.png)
3. Once this is done, please update the .yml file in the repository with the below code. In this case, we have taken a sample file aws_codebuild.yml:
![add yml file in buildspect in AWS DevOps](https://docs.testsigma.com/images/aws-devops/buildspec-yml-aws-devops.png)


3. Once this is done, please update the .yml file in the repository with the below code. In this case, we have taken a sample file **aws_codebuild.yml**:

**Starter pipeline**
**Starter pipeline**<br>
**Start with a minimal pipeline that you can customize to build and deploy your code**
## [Add steps that build, run tests, deploy, and more:](#)

Expand All @@ -68,9 +71,9 @@ phases:
- echo Build completed on `date`
```
As shown in the above code, the file cicd-api.sh under commands needs to be updated with Test Plan details and added to the repository. We have taken a sample file.
As shown in the above code, the file cicd-api.sh under commands needs to be updated with test plan details and added to the repository. We have taken a sample file.
Add the [Test Plan details](https://testsigma.com/docs/continuous-integration/get-test-plan-details/) and [API key](https://testsigma.com/docs/configuration/api-keys/) to the .sh file which you need to trigger:
Add the [test plan details](https://testsigma.com/docs/continuous-integration/get-test-plan-details/) and [API key](https://testsigma.com/docs/configuration/api-keys/) to the **.sh** file which you need to trigger:
```shell
#********START USER_INPUTS ********
Expand All @@ -89,10 +92,12 @@ RUNTIME_DATA_INPUT="buildurl=http://test.testsigma.com,data1=testdata"

4. Now in the AWS CodeBuild, click on start build:
![start build button in AWS DevOps](https://docs.testsigma.com/images/aws-devops/start-build-button-aws-devops.png)

5. Once Build has been initiated you can check the progress and build logs as shown in the screenshot below:
![build progress in AWS DevOps](https://docs.testsigma.com/images/aws-devops/build-progress-aws-devops.png)
Go to your Testsigma account, where you will see that your Test Plan (the ID which you have given in your .sh file) has been triggered.
![CI/CD integration in Testsigma](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/continuous-integration/aws-devops/cicd-integration-testsigma.png)

You will find the execution ID for the Test Plan within the **REST API call to start Test Plan** section.
![Get Test Plan ID](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/trineid.png)

### Create CodePipeline with Source, Build, and Pipeline details

Expand All @@ -101,19 +106,24 @@ Similarly, you can go to the CodePipeline service in AWS and create a pipeline f
Follow the below steps for creating CodePipeline and triggering the test:

1. Click on create a pipeline:

![create pipeline in AWS DevOps](https://docs.testsigma.com/images/aws-devops/create-pipeline-aws-devops.png)
2. Fill in the build details (selecting the repository accordingly) and select the project which you want to add to your pipeline. In the below screenshot you can see that the project which we created earlier in CodeBuild "demo123" is visible here and we will be selecting that only.


2. Fill in the build details (selecting the repository accordingly) and select the project which you want to add to your pipeline. In the below screenshot you can see that the project which we created earlier in CodeBuild "demo123" is visible here and we will be selecting that only.
![add build stage in AWS DevOps](https://docs.testsigma.com/images/aws-devops/add-build-stage-aws-devops.png)

3. Once you have given the details for the Pipeline settings, Source, Deploy stage then you can review the details and click on Create Pipeline:
![review pipeline settings in AWS DevOps](https://docs.testsigma.com/images/aws-devops/pipeline-settings-review-aws-devops.png)

As soon as you click on create pipeline the run will be triggered:
![Run triggered after creating pipeline in AWS DevOps](https://docs.testsigma.com/images/aws-devops/create-pipeline-run-triggered-aws-devops.png)

That's all we need to automate Test Execution when a successful build is triggered using the AWS DevOps.

Source: [https://docs.aws.amazon.com/codepipeline/index.html](https://docs.aws.amazon.com/codepipeline/index.html)


Source: [https://docs.aws.amazon.com/codepipeline/index.html](https://docs.aws.amazon.com/codepipeline/index.html)





Expand Down
71 changes: 41 additions & 30 deletions src/pages/docs/continuous-integration/aws-labmda.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,52 +13,63 @@ contextual_links:
url: "#how-to-add-an-execution-step-in-aws-lambda"
---


---

AWS Lambda, you can run code for virtually any type of application or backend service. CodeCommit is a trigger for AWS Lambda execution. In this document, we will discuss how you can Integrate AWS Lambda with Testsigma
With AWS Lambda, you can run code for virtually any application or backend service. CodeCommit is a trigger for AWS Lambda execution. This article discusses how you can integrate AWS Lambda with Testsigma.

---
##**How to add an execution step in AWS Lambda:**
1. Go to the functions option under AWS Lambda and click on the button ‘Create Functions’:

## **How to Add an Execution Step in AWS Lambda:**

1. Go to the functions option under AWS Lambda and click on **Create Functions**.
![create function button in AWS Lambda](https://docs.testsigma.com/images/aws-labmda/create-function-button-aws-lambda.png)
2. Fill in the Basic information for creating a function and click on Create function after that:

2. Fill in the basic information for creating a function and click on **Create Function**.
![enter basic information to create function in AWS Lambda](https://docs.testsigma.com/images/aws-labmda/basic-information-create-function-aws-lambda.png)
3. Once the function is created, you can scroll down to Basic settings to check the Handler file information along with the basic timeout details.

3. Once the function is created, you can scroll down to **Basic Settings** to check the Handler file information along with the basic timeout details.

In the screenshot below, you can see that hello.handler is your handler file.
![handler information for Testsigma integration in AWS Lambda](https://docs.testsigma.com/images/aws-labmda/handler-info-testsigma-integration-AWS-Lambda.png)
In the screenshot below, you can see that hello.handler is your handler file.
![handler information for Testsigma integration in AWS Lambda](https://docs.testsigma.com/images/aws-labmda/handler-info-testsigma-integration-AWS-Lambda.png)


4. You can check the hello.handler file if you scroll up.

In the screenshot below, you can see that the hello.handler file contains the "aws-testsigma.sh" file. This aws-testsigma.sh file will contain all the information of the Test Plan.

![function code for Testsigma integration in AWS Lambda](https://docs.testsigma.com/images/aws-labmda/testsigma-integration-function-code-aws-lambda.png
)
5. The aws-testsigma.sh should contain the below information of the [Test Plan ID](https://testsigma.com/docs/continuous-integration/get-test-plan-details/) and [API Key](https://testsigma.com/docs/configuration/api-keys/) which you need to trigger:
In the screenshot below, you can see that the hello.handler file contains the **aws-testsigma.sh** file. This **aws-testsigma.sh** file will contain all the information of the test plan.
![function code for Testsigma integration in AWS Lambda](https://docs.testsigma.com/images/aws-labmda/testsigma-integration-function-code-aws-lambda.png)


5. The aws-testsigma.sh should contain the below information of the [Test Plan ID](https://testsigma.com/docs/continuous-integration/get-test-plan-details/) and [API Key](https://testsigma.com/docs/configuration/api-keys/) which you need to trigger:

```shell
#********START USER_INPUTS ********

TESTSIGMA_USER_NAME=<Username>
TESTSIGMA_PASSWORD=<Password>
TESTSIGMA_TEST_PLAN_RUN_URL=<Test Plan URL containing the unique Test Plan id>
MAX_WAIT_TIME_FOR_SCRIPT_TO_EXIT=180
JSON_OUTPUT_REPORTS_DIR=.

#********END USER_INPUTS***********
```

![aws-testsigma.sh information in AWS Lambda](https://docs.testsigma.com/images/aws-labmda/aws-testsigma-sh-aws-lambda.png
)
The URL details for the test plan can be taken from the Testsigma app:
![URL details for a test plan in Testsigma](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/continuous-integration/aws-labmda/url-details-test-plan-testsigma.png)
6. Click on TEST at the top right corner to trigger the Test Plan.
```shell
#********START USER_INPUTS ********

TESTSIGMA_USER_NAME=<Username>
TESTSIGMA_PASSWORD=<Password>
TESTSIGMA_TEST_PLAN_RUN_URL=<Test Plan URL containing the unique Test Plan id>
MAX_WAIT_TIME_FOR_SCRIPT_TO_EXIT=180
JSON_OUTPUT_REPORTS_DIR=.

#********END USER_INPUTS***********
```

![aws-testsigma.sh information in AWS Lambda](https://docs.testsigma.com/images/aws-labmda/aws-testsigma-sh-aws-lambda.png)


The URL details for the test plan can be taken from **REST API call to start Test Plan** section in Testsigma.
![Get Test Plan ID](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/trineid.png)


6. Click on **TEST** at the top right corner to trigger the Test Plan.
![test Testsigma integration in AWS Lambda](https://docs.testsigma.com/images/aws-labmda/test-testsigma-integration-aws-lambda.png)

![execution results of Testsigma integration in AWS Lambda](https://docs.testsigma.com/images/aws-labmda/testsigma-integration-execution-result-aws-lambda.png)
![execution results of Testsigma integration in AWS Lambda](https://docs.testsigma.com/images/aws-labmda/testsigma-integration-execution-result-aws-lambda.png)

That's all we need to automate Test Execution when a successful build is triggered using the AWS Lambda.
Source: [https://aws.amazon.com/lambda/](https://aws.amazon.com/lambda/)
---
Loading

0 comments on commit d5d5685

Please sign in to comment.