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

Dev to main [ 25 Sept ] #285

Merged
merged 24 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
544b62d
Updated docs as per new UI features (#276)
bharathk08 Sep 20, 2023
8bfd6cd
fix: Hubspot hellobar not showing up in the docs page (#277)
Santhosh-testsigma Sep 20, 2023
a9c5ea3
dev server not able to access in network. FIX
PratheepV Sep 20, 2023
e7ebb38
Updated the following docs as per new UI
bharathk08 Sep 21, 2023
ce549e0
Merge branch 'dev' into doc-224
PratheepV Sep 21, 2023
f88169a
Merge pull request #279 from testsigmahq/doc-224
bharathk08 Sep 21, 2023
62c4a78
Updated Documents as per React UI - Set 1 (#278)
sangithravichandran Sep 21, 2023
8c35296
Fix: if have env file remove (#280)
jayavel-testsigma Sep 21, 2023
d1edd10
Updated the docs as per new UI (#281)
bharathk08 Sep 22, 2023
2bfde64
Updated the docs as per new UI
bharathk08 Sep 25, 2023
dccbaa2
Updated Documents as per React UI - Set 2
sangithravichandran Sep 25, 2023
60be7be
Merge branch 'dev' into react-ui-set-2
sangithravichandran Sep 25, 2023
029e9bd
Merge branch 'dev' into doc-228
PratheepV Sep 25, 2023
e68df04
hubspot hellobar is not showing up on the docs site
Santhosh-testsigma Sep 25, 2023
44e3ffe
Merge pull request #284 from testsigmahq/fix/husbpot-hellobar
Santhosh-testsigma Sep 25, 2023
d00ff0a
Merge branch 'dev' into react-ui-set-2
Santhosh-testsigma Sep 25, 2023
d4c6793
Merge branch 'dev' into doc-228
Santhosh-testsigma Sep 25, 2023
8a20821
Merge pull request #283 from testsigmahq/react-ui-set-2
Santhosh-testsigma Sep 25, 2023
7acf843
Merge branch 'dev' into doc-228
Santhosh-testsigma Sep 25, 2023
cab181e
Merge pull request #282 from testsigmahq/doc-228
Santhosh-testsigma Sep 25, 2023
522f608
fix: Removing env file if already exists in prod build file
Santhosh-testsigma Sep 25, 2023
841fad1
Merge pull request #286 from testsigmahq/fix/build-error
Santhosh-testsigma Sep 25, 2023
f6c16ef
Merge remote-tracking branch 'origin/main' into fix/reverse-merge-main
jayavel-testsigma Sep 25, 2023
6c33a75
Merge pull request #287 from testsigmahq/fix/reverse-merge-main
Santhosh-testsigma Sep 25, 2023
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
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ TYPESENSE_PORT=8108
TYPESENSE_PROTOCOL=http
TYPESENSE_COLLECTION=actions-development-old
TYPESENSE_SEARCH_API_KEY=J9NTGZUEemHDtei3eNn555fRDLygudgO
GA_TRACKING_ID=GA_TRACKING_ID
GTAG_TRACKING_ID_FOR_GA4=GTAG_TRACKING_ID_FOR_GA4
GTAG_TRACKING_ID_FOR_GTAG=GTAG_TRACKING_ID_FOR_GTAG
BUCKET_NAME=BUCKET_NAME
HOST_NAME=HOST_NAME
ASSET_HOST=ASSET_HOST
FRESHCHAT_TOKEN=FRESHCHAT_TOKEN
1 change: 1 addition & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
run: npm install --ignore-scripts=false --verbose [email protected] --unsafe-perm --force
- name: 'Create env file'
run: |
rm -rf .env
touch .env
echo BUCKET_NAME=${{ secrets.BUCKET_NAME }} >> .env
echo HOST_NAME=${{ secrets.HOST_NAME }} >> .env
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/staging-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
run: npm install --ignore-scripts=false --verbose [email protected] --unsafe-perm --force
- name: 'Create env file'
run: |
rm -rf .env
touch .env
echo BUCKET_NAME=${{ secrets.WEBSITE_STAGING_BUCKET_NAME }} >> .env
echo HOST_NAME=${{ secrets.WEBSITE_STAGING_HOST_NAME }} >> .env
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"gatsby"
],
"scripts": {
"develop": "gatsby develop",
"develop": "NODE_ENV=development gatsby develop -H 0.0.0.0",
"start": "gatsby develop",
"build": "gatsby build",
"serve": "gatsby serve",
"serve": "NODE_ENV=development gatsby serve -H 0.0.0.0",
"clean": "gatsby clean",
"deploy": "gatsby-plugin-s3 deploy -y",
"index": "node ./scripts/indexr.js"
Expand Down
2 changes: 2 additions & 0 deletions src/components/seo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ function SEO({ lang,
<script src="https://polyfill.io/v3/polyfill.min.js?features=default%2CArray.prototype.find%2CArray.prototype.includes%2CPromise%2CObject.assign%2CObject.entries" />
{/* Algolia API v4 IE11 support */}
<script src="https://polyfill.io/v3/polyfill.min.js?features=Promise%2CObject.entries%2CObject.assign" />
<script async defer type='text/javascript' charSet='utf-8' src='https://js.hsforms.net/forms/embed/v2.js' />
<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/23422177.js"></script>

<script type="application/ld+json">
{'{'+
Expand Down
223 changes: 105 additions & 118 deletions src/pages/docs/agent/setup-on-windows-mac-linux.md

Large diffs are not rendered by default.

30 changes: 17 additions & 13 deletions src/pages/docs/configuration/api-keys.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
---
title: "Generate API Key"
metadesc: "Learn how to generate an API Keys to integrate Testsigma Application with third party tools like CI/CD, bug reporting tools, and more."
pagetitle: "Generating API Key: Steps to Access Testsigma Programmatically"
metadesc: "Learn how to generate your API key in Testsigma to access and control Testsigma programmatically. Follow these simple steps for smooth integration and automation."
noindex: false
order: 19.1
page_id: "Generate API Key"
warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Steps to Generate API Key"
url: "#steps-to-generate-api-key"
---

---

To integrate Testsigma with any 3rd party tool (for CI/CD, bug reporting, and so on), you need to authenticate the connection, and to do that, you need an API key. Here is how you can generate the API key via Testsigma to authenticate Testsigma for integration with your 3rd party tool.
You can access and control it programmatically once you generate the API key. Testsigma will authenticate the connection and integrate with any 3rd party tool (for CI/CD, bug reporting, and so on). This document will guide you through generating the necessary API keys.

1. log in to your Testsigma account.
2. Navigate to **Settings > API keys.**
3. Click on the ‘Create’ button on the top right corner to generate a new API key.
![API Keys page in Testsigma](https://docs.testsigma.com/images/api-keys/api-keys-page-in-testsigma.png)
---


4. This will open the ‘New API Key’ form:
## **Steps to Generate API Key**

<img src="https://docs.testsigma.com/images/api-keys/new-api-key-page-testsigma.png
" alt="new API key page in Testsigma" width="300"/>
Follow the below steps to generate an API key in Testsigma:

Enter the name you want to give to the API key, and if required, enter a description for the API key. Click the ‘Create’ button on the form.
5. The key will now be visible on the API keys page. To get the details, click on the API key you created. The details will look something like this:
1. Navigate to **Settings** > **API Keys** in the left-side navbar.
2. Click the **Generate new API Key** button in the top right corner of the screen on the **API Keys** page, and a **Generate API Key** pop-up overlay will appear.
3. In the pop-up overlay for **Generate API Key**, you can enter a **Name** for your **API Key** and specify the **number of parallel test** executions for this key. The overlay provides a toggle for restricting parallel test execution for this key.
4. After entering a name and configuring parallel settings, click the **Generate Key** button. The API key will be displayed on the screen. Click the **Copy API Key** button to copy it to your clipboard for use in your applications or scripts. ![Generate API Key](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/generate_apikey.gif)

![API key details in Testsigma](https://docs.testsigma.com/images/api-keys/api-key-details-testsigma.png)
---
68 changes: 30 additions & 38 deletions src/pages/docs/continuous-integration/azure-devops.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,47 +22,40 @@ contextual_links:
Microsoft Azure, aka Azure, is a cloud computing service created by Microsoft for building, testing, deploying, and managing applications and services through Microsoft-managed data centers.

---
##**Prerequisites:**
1. **API key for Azure:** To generate this, follow the below steps:
1. Log in to your account on Testsigma
2. Navigate to[Settings > API keys](https://testsigma.com/docs/configuration/api-keys/)
3. Click on the ‘Create’ button to generate a new API key.
2. [Test Plan ID:](https://testsigma.com/docs/continuous-integration/get-test-plan-details/) To get this, follow the steps below:
1. Click on the Test Plan name that you want to integrate
2. On the Test Plan details page that opens, click on the CI-CD integration tab.
3. You will find the execution ID for the Test Plan within the ‘REST API call to start Test Plan’ body content as shown in the screenshot below:
![get test plan id](https://docs.testsigma.com/images/azure-devops/get-test-plan-id.png)

---
##**How to integrate with Azure DevOps**
**Step 1: Create/Select a Pipeline**
Once you are logged in to the Azure DevOps account and created a Project, you can click on the Pipeline section and the below image will be displayed. If you want to create a **new pipeline**, we need to click on the New Pipeline Button to get started.
## **Prerequisites:**
- API key for Azure. For more information, refer to [API keys](https://testsigma.com/docs/configuration/api-keys/).

2. A Test Plan ID. For more information, refer to [get test plan id](https://docs.testsigma.com/images/azure-devops/get-test-plan-id.png).

---
## **How to integrate with Azure DevOps**
1. Login to the Azure DevOps account and create a **Project**. Navigate to Pipelines and click on the **New Pipeline** to get started.
![create new pipeline azure devops](https://docs.testsigma.com/images/azure-devops/create-new-pipeline-azure-devops.png)
**Step 2: Select the Version Control System(VCS)**
After clicking on the New Pipeline button, the below page will be displayed where you need to integrate with the version control system(VCS) such as Git Hub, Bitbucket, etc. where your application code is stored.

2. Choose the **Version Control System** (VCS) where your application code is stored.
![select version control system in Azure Devops](https://docs.testsigma.com/images/azure-devops/select-version-control-system-azure-devops.png)


[[info | NOTE:]]
| In order to integrate with Azure, you need to have a YAML file in your Code repository. This file contains the details for the CI/CD Integration with Azure DevOps. If not available yet, Azure has an option in which it will create a sample YAML file in your repository once access is given.

**Step 3: Select the Repository**
Once you have selected the VCS, it will take you to a page where it will ask you to choose the repository where your Configuration YAML file is present.

3. Choose the repository where your Configuration YAML file is present. Once you select your repository it will take you to the configuration page where you can configure your pipeline.
![select repository in Azure DevOps](https://docs.testsigma.com/images/azure-devops/select-repository-azure-devops.png)

Once you select your repository it will take you to the configuration page where you can configure your pipeline.

**Step 4: Select Configuration**
If you already have your YAML file in your repo, you can select the option **Existing Azure Pipeline YAML file**. Otherwise, you can select **Starter Pipeline** to create a sample YAML file in the selected repository.

4. On **Configure your pipeline** page, if you already have your YAML file in your repo, you can select the option **Existing Azure Pipeline YAML file**. Otherwise, you can select **Starter Pipeline** to create a sample YAML file in the selected repository.
![configure your pipeline page in Azure DevOps](https://docs.testsigma.com/images/azure-devops/configure-your-pipeline-azure-devops.png)
In this case, we already had an existing YAML file in the repo. So, once you select the fourth option in the above image, it will take you to a place where you need to enter the branch and path of the YAML file in your repository,


In this case, we already had an existing YAML file in the repo. So, once you select the fourth option in the above image, it will take you to a place where you need to enter the branch and path of the YAML file in your repository.
![Select existing pipeline while configuring an existing YAML file in Azure DevOps](https://docs.testsigma.com/images/azure-devops/configure-pipeline-select-yaml-file-azure-devops.png)
**Step 5: Review the CI Configuration**
After selecting the Branch and path you can click on "continue" and you will need to review your YAML code.


5. Review the CI Configuration after selecting the Branch and Path, click on **Continue**.
![Review CI configuration in Azure DevOps](https://docs.testsigma.com/images/azure-devops/review-ci-configuration-azure-devops.png)

The YAML file contains the following code where you need to enter the filePath of the [Generic Shell Script](https://testsigma.com/docs/continuous-integration/shell-script/) (cicd-api.sh) to run it. This Shell script is the one that actually triggers the Test Plan execution and gives you the result of Test plan once it's complete.

```yaml
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
Expand All @@ -89,26 +82,25 @@ testResultsFiles: '**/junit-report.xml' //Result File Type


In order to Trigger a particular test plan, you just need to add your own Test plan Execution id and the API key in the Shell Script (cicd-api.sh). As shown below:

![shell script for Azure DevOps](https://docs.testsigma.com/images/azure-devops/shell-script-azure-devops.png)

Please check the below article to get insight on the configuration of Generic Shell Script:
[Generic Shell Script for Integrating with any CI/CD Tool](https://testsigma.com/docs/continuous-integration/shell-script/)

**Step 6: Test the Configuration**
Once the Script is set up and Reviewed for the pipeline, you can click on the **Run** button to start your Job.
For more information on configuration of Generic Shell Script, refer to https://testsigma.com/docs/continuous-integration/shell-script/.

6. Test the configuration once the script is set up and reviewed for the pipeline, and click on the **Run** to start your Job.
![test configuration in Azure DevOps](https://docs.testsigma.com/images/azure-devops/test-configuration-azure-devops.png)

Once the Run is initiated, you will see this page:
![set up ci with Azure Pipelines](https://docs.testsigma.com/images/azure-devops/setup-ci-with-azure-pipelines.png)
Once the job has been completed, the Job status will be "Success" as shown in the image below:

Once the job has been completed, the Job status will be **Success** as shown in the image below:
![Job Status Success in Azure DevOps](https://docs.testsigma.com/images/azure-devops/job-status-success-azure-devops.png)
**Step 7: Checking the Test Run Results**
That was all about Running the Job, now we would learn how can we see the result reports in Azure. Once the job is completed we can see the JUnit report in the **Test Plans > Runs** as shown below:

7. Once the job is completed we can see the reports in the **Test Plans > Runs**.
![Test Plans Runs in Pipelines in Azure DevOps](https://docs.testsigma.com/images/azure-devops/pipelines-testplans-runs-azure-devops.png)
After clicking on Runs you can select the Test plan for which you want to view the report and then you will be navigated to the page below, and also you can download the JUnit report in XML format.

After clicking on **Runs** you can select the Test plan for which you want to view the report and then you will be navigated to the page below, and also you can download the JUnit report in XML format.
![Junit report in Azure DevOps](https://docs.testsigma.com/images/azure-devops/junit-report-azure-devops.png)
You can use another shell script to convert the JUnit XML format result into an HTML format. A tool like [Allure](https://docs.qameta.io/allure/#_reporting) can help you with this.

You can use another shell script to convert the JUnit XML format result into an HTML format.


57 changes: 49 additions & 8 deletions src/pages/docs/continuous-integration/bitbucket-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,63 @@ title: " Integrate Testsigma with Bitbucket CI"
metadesc: "How to integrate Testsigma with Bitbucket CI"
noindex: false
order: 12.22
page_id: " Integrate Testsigma with Bitbucket CI"
page_id: "Integrate Testsigma with Bitbucket CI"
warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Prerequisites:"
url: "#prerequisites"
- type: link
name: "Steps to Integrate Bitbucket with Testsigma"
url: "#steps-to-integrate-bitbucket-with-testsigma"
---
---

You will need to setup a Bitbucket pipeline to integrate Testsigma to Bitbucket. To know how to create a bitbucket pipeline please refer here: https://support.atlassian.com/bitbucket-cloud/docs/get-started-with-bitbucket-pipelines/
You can trigger tests automatically with Bitbucket integration with Testsigma. This article explains how to integrate Bitbucket with Testsigma for CI/CD purposes.

---

## **Prerequisites**
- Testsigma API key. For more information, see [Generate API Key](https://testsigma.com/docs/configuration/api-keys/).
- Testsigma Test Plan ID. For more information, refer to [Get Test Plan ID](https://testsigma.com/docs/continuous-integration/get-test-plan-details/).

---

Follow below steps to configure your bitbucket pipeline to execute Testsigma tests:
## **Steps to Integrate Bitbucket with Testsigma**
1. On your project, navigate to **Repository > Pipelines**.
![Bitbucket Project](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/bbprojet.png)

1. Go to the page [here](https://testsigma.com/docs/continuous-integration/shell-script/) and save the script as "testsigma-cicd.sh"
2. Click on **Create your first pipeline** and select **Starter pipeline**.
![Create First Pipeline](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/plbb.png)

2. Edit your bitbucket-pipelines.yml and add this command to your script section:
testsigma-cicd.sh
3. Create a job using the below YML sample.

```
pipelines:
default:
- parallel:
- step:
name: 'Build and Test'
script:
- echo "Your build and test goes here..."
- echo "Calling Shell Script of testsigma"
- chmod a+x testsigma-cicd.sh
- ./testsigma-cicd.sh
```

With above changes, the "testsigma-cicd.sh" script will be triggered whenever the bitbucket pipeline executes. The script will wait until the test completes and checks that the result of the tests is passed.
[[info | **NOTE**:]]
|Refer to the Shell Script to get the sh script, which contains the command that triggers the test plan and fetches the run result. You can place the sh script in the same project, call the file inside the YML file, or obtain it from any external sources by providing the appropriate path.<br> <br>
|Any bash runner can work with the provided YML file. For instance, if you are using the docker runner, you can use the YML file as it is. However, if you have a different runner like powershell, you must modify the YML file to make it executable in the powershell runner. Additionally, ensure that powershell is version seven or above.

---
4. In the shell script, provide the **Test Plan ID** and **API Key**.
![Test Plan In Shell Script](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/tsssbb.png)

5. Once you have created the YML script, click on **Commit** to run the job.
![Commit](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/firstplbb.png)

6. Once the job is completed you can see the execution report as an XML report based on the path you have shared on the shell script.
![Report](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/buildbb.png)

---
Loading