Skip to content

Commit

Permalink
Merge pull request #517 from testsigmahq/dev
Browse files Browse the repository at this point in the history
Dev >>> Fixed pages having HTTP links and Updated agent setup doc
  • Loading branch information
Santhosh-testsigma authored Oct 3, 2024
2 parents cd5afe0 + 67a2ba1 commit 7f30cad
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 79 deletions.
128 changes: 70 additions & 58 deletions src/pages/docs/agent/setup-on-windows-mac-linux.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: " Setting up Testsigma Agent on your local machine"
title: "Setting Up Testsigma Agent Locally"
metadesc: "Learn how to install Testsigma Agent on your local machine and register it to your Testsigma Account for local inspection and test runs."
noindex: false
order: 11.3
Expand Down Expand Up @@ -34,25 +34,25 @@ contextual_links:

---

With Testsigma Agent you can run tests on local machines/devices in addition to Testsigma Cloud. This article discusses how to set up the Testsigma agent on your local machine.
With **Testsigma Agent** you can run tests on local machines/devices in addition to Testsigma Cloud. This article discusses how to set up the Testsigma agent on your local machine.

---

## **Download Formats Available**
The Testsigma Agents are available in the following forms:
1. **ZIP files**
2. **Executable files**
3. **DMG files**
4. **Docker image**
> ## **Download Formats Available**
> The Testsigma Agents are available in the following forms:
> 1. **ZIP files**
> 2. **Executable files**
> 3. **DMG files**
> 4. **Docker image**
---

## **Steps to Download Testsigma Agent as a ZIP File**
1. Navigate to **Agents** and click on **Download Agent**.
![Agents Page](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/navagent.png)
1. Navigate to **Agents** and click **Download Agent**.
![Agents Page](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Navigate_To_Agents.png)

2. From the dropdown that appears, download the ZIP file as per your machine.
![ZIP Files](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/lazipfiles.png)
![ZIP Files](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Download_Agent.png)

3. After downloading the agent ZIP file, extract the Testsigma Agent ZIP file to a location of your choice. Some suggested locations to place the Testsigma agent folder are mentioned in the table below: <br>

Expand All @@ -71,14 +71,13 @@ You can either start the Testsigma agent server as a process via the command lin
---

## **Steps to Download Testsigma Agent as Executable File**
1. Navigate to **Agents** and click on **Download Agent**.
![Agents Page](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/navagent.png)

1. Navigate to **Agents** and click **Download Agent**.

2. From the dropdown that appears, select the executable file supported by your machine.
- For **Windows**, select <kbd>**exe**</kbd>,
- For **mac**, select <kbd>**dmg**</kbd>,
- For **Linux**, select <kbd>**bin**</kbd> to **download** the latest version of **Testsigma Agent**.
![EXE Files](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/exefilesla.png)

3. Double click on the downloaded file.

Expand All @@ -102,21 +101,19 @@ Once the installation is complete, you can either run the Testsigma Agent server
3. After starting up you will be directed to the agent registration page.
![Redirect to Registration](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/regpagewidows.png)

For more information on how to register Testsigma Agent, refer to ***register the Testsigma Agent***.


### **For Mac/Linux**

1. Navigate to the Testsigma Agent installation folder and drag ***start.sh*** to a new terminal window and click on **Return**.
![New Terminal](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/terminalla.png)
![New Terminal](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Start_Agent_shFile.png)

2. Wait for a few minutes for the Testsigma Agent to start up.
1. Wait for a few minutes for the Testsigma Agent to start up.
![Start Agent](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/agntstartla.png)

3. After starting up you will be directed to the agent registration page.
![Reg page](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/aregpage.png)
1. After starting up you will be directed to the agent registration page.
![Reg page](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Agent_Reg_Page.png)

For more information on how to register Testsigma Agent, refer to ***register the Testsigma Agent***.
For more information on how to register Testsigma Agent, see [Register the Testsigma Agent](https://testsigma.com/docs/agent/setup-on-windows-mac-linux/#register-the-testsigma-agent).

---

Expand Down Expand Up @@ -157,27 +154,29 @@ dump Request a Java thread dump if running.
---

## **Register the Testsigma Agent**
1. Once your Testsigma agent is up and running, you will be directed to the Agent registration page.
![Reg page](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/aregpage.png)

2. Click on **Register** to start the Agent registration process.
![Register](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/regclick.png)
1. Once your Testsigma agent is up and running, you will be directed to the **Agent Registration** page. Click **Register** to start the registration process.
![Register Button](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Register_Agent_button.png)

3. On the **Add new Agent** overlay,
2. On the **Add new Agent** dialog,
- Enter a **Name** for your machine.
- If you want to make this agent private, uncheck the checkbox **Visible to Everyone**.
![Add New Agent Page](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/addnewagentla.png)
- Click on **Add Agent**.
![Add Agent](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/aala.png)
- Specify the maximum sessions in the textbox provided.
- To set your agent’s visibility, select either the **Public** or **Private** radio button.
- For agent activation, choose either **Activate now** or **Activate later**.
- Click on **Register & Activate**
![Register & Activate](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Agent_Details.png)

2. Once the agent registration is successful, the dialog will display a success message..
![Successful Message](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Agent_Success.png)

4. After adding, the agent that you registered will be displayed with all the available browsers in that Agent machine:
![Available Browsers](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/availblbrowsers.png)
3. On the Agents page, the agent you registered will be displayed along with all the available browsers on that agent machine.
![Available Browsers](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Available_Browsers.png)

[[info | **NOTE**:]]
|1. There may be instances when you want to add the Testsigma agents to your Testsigma account but want to activate them later. Make sure to check the Activate Later checkbox, On the Add a new Agent popup.
|![Activate Later](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/alaterla.png)
|2. On successfully adding the agent, you will be taken to the agent configuration page that contains the command that you can use to activate the agent later.
|![Config page](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/laconfig.png)
| 1. There may be instances when you want to add the Testsigma agents to your Testsigma account but want to activate them later. Make sure to select the **Activate Later** radio button on the **Add new Agent** dialog.
|![Activate Later](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Activate_Later.png)
|
| 2. On successfully adding the agent, you will be taken to the agent configuration page that contains the command that you can use to activate the agent later.
|![Config page](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Agent_Config.png)

It might take a couple of minutes for the operating system version and the browser names to appear. Refer to the [troubleshooting guide](https://testsigma.com/docs/agent/troubleshooting/setup-issues/) if the details does not show up after 10 minutes.

Expand All @@ -190,25 +189,13 @@ There are two ways of starting the testsigma local agent using docker:

---

1. On the dashboard, click on **Agents**.
![Agents](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/agdashla.png)

2. Click on **Add new Agent**.
![Add New Agent](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/anewagentla.png)

3. On the **Add a new Agent** form,
- Add the **Name** for the agent.
![NAME](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/agentnamela.png)
- Make sure to check the **Activate Later** checkbox.
![Activate Later](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/alaterla.png)

4. Click on **Add Agent**.
![Add Agent](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/aala1.png)
[[info | **NOTE**:]]
| Refer to the section above to add an agent using the **Activate Later** option.

5. On successfully saving the agent, you will be taken to the agent configuration page that will contain the activation key.
![Config Page](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/configlapage.png)
1. Once the Agent is registered, navigate to **Agents > select the agent > Config**, and copy the **Activation Key**.
![Activation Key](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Agent_Key.png)

6. Create a **docker-compose.yml** file with **TS\_ACTIVATION\_KEY** environment variables.
2. Create a **docker-compose.yml** file with **TS\_ACTIVATION\_KEY** environment variables.

The following docker-compose snippet can be used to start a Testsigma Agent with headless Chrome, Firefox & Edge browsers:
<br>
Expand All @@ -224,6 +211,7 @@ There are two ways of starting the testsigma local agent using docker:
- edge
volumes:
- ./data/agent_data:/var/ts/agent
- ./data/agent_temp:/tmp/agent_temp
- ./<foldername>:/root/.testsigma/agent/logs
environment:
TS_ACTIVATION_KEY: "REPLACE_WITH_YOUR_ACTIVATION_KEY"
Expand All @@ -236,18 +224,24 @@ There are two ways of starting the testsigma local agent using docker:
shm_size: 1gb
ports:
- "4444:4444"
volumes:
- ./data/agent_temp:/tmp/agent_temp

firefox:
image: selenium/standalone-firefox:latest
shm_size: 1gb
ports:
- "4445:4444"
volumes:
- ./data/agent_temp:/tmp/agent_temp
edge:
image: selenium/standalone-edge:latest
shm_size: 1gb
ports:
- "4446:4444"
volumes:
- ./data/agent_temp:/tmp/agent_temp

This docker-compose snippet spins up four containers:<br>

Expand All @@ -270,6 +264,7 @@ There are two ways of starting the testsigma local agent using docker:
- chrome
volumes:
- ./data/agent_data:/var/ts/agent
- ./data/agent_temp:/tmp/agent_temp
- ./<foldername>:/root/.testsigma/agent/logs
environment:
TS_ACTIVATION_KEY: "REPLACE_WITH_YOUR_ACTIVATION_KEY"
Expand All @@ -280,6 +275,8 @@ There are two ways of starting the testsigma local agent using docker:
shm_size: 1gb
ports:
- "4444:4444"
volumes:
- ./data/agent_temp:/tmp/agent_temp

<br><br>
If your system lacks sufficient resources, you can distribute browser containers across multiple systems and specify a remote debugging URL. Here's an example docker-compose file: <br>
Expand All @@ -291,6 +288,7 @@ There are two ways of starting the testsigma local agent using docker:
container_name: testsigma-agent
volumes:
- ./data/agent_data:/var/ts/agent
- ./data/agent_temp:/tmp/agent_temp
- ./<foldername>:/root/.testsigma/agent/logs
environment:
TS_ACTIVATION_KEY: "REPLACE_WITH_YOUR_ACTIVATION_KEY"
Expand All @@ -307,6 +305,7 @@ There are two ways of starting the testsigma local agent using docker:
container_name: testsigma-agent
volumes:
- ./data/agent_data:/var/ts/agent
- ./data/agent_temp:/tmp/agent_temp
- ./<foldername>:/root/.testsigma/agent/logs
environment:
TS_ACTIVATION_KEY: "REPLACE_WITH_YOUR_ACTIVATION_KEY"
Expand All @@ -330,6 +329,7 @@ There are two ways of starting the testsigma local agent using docker:
- firefox
volumes:
- ./data/agent_data:/var/ts/agent
- ./data/agent_temp:/tmp/agent_temp
- ./<foldername>:/root/.testsigma/agent/logs
environment:
TS_ACTIVATION_KEY: "REPLACE_WITH_YOUR_ACTIVATION_KEY"
Expand All @@ -341,17 +341,22 @@ There are two ways of starting the testsigma local agent using docker:
shm_size: 1gb
ports:
- "4444:4444"
volumes:
- ./data/agent_temp:/tmp/agent_temp

firefox:
image: seleniarm/standalone-firefox:latest
shm_size: 1gb
ports:
- "4445:4444"
volumes:
- ./data/agent_temp:/tmp/agent_temp

<br>

7. Save the **docker-compose.yml** file in an appropriate directory.
1. Save the **docker-compose.yml** file in an appropriate directory.

8. Open a command-line interface and navigate to the directory. Execute the command **docker-compose up**, which will download the necessary images and start the Testsigma Agent.
2. Open a command-line interface and navigate to the directory. Execute the command **docker-compose up**, which will download the necessary images and start the Testsigma Agent.

---

Expand All @@ -377,6 +382,7 @@ Here's an example docker-compose file:
- edge
volumes:
- ./data/agent_data:/var/ts/agent
- ./data/agent_temp:/tmp/agent_temp
- ./<foldername>:/root/.testsigma/agent/logs
environment:
TS_AUTO_REGISTRATION_KEY: "REPLACE_WITH_API_KEY"
Expand All @@ -392,20 +398,26 @@ Here's an example docker-compose file:
shm_size: 1gb
ports:
- "4444:4444"
volumes:
- ./data/agent_temp:/tmp/agent_temp

firefox:
image: selenium/standalone-firefox:latest
shm_size: 1gb
ports:
- "4445:4444"

volumes:
- ./data/agent_temp:/tmp/agent_temp
edge:
image: selenium/standalone-edge:latest
shm_size: 1gb
ports:
- "4446:4444"
volumes:
- ./data/agent_temp:/tmp/agent_temp

<br><br>
<br>
Please refer to the Activation Key sections for alternative methods of configuring the docker-compose file and starting the Agent using the docker-compose file.

---
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Once the three components are set up as service, you can run them one by one as
The final step is to navigate to ```%WinDir%\System32\Drivers\Etc``` and add ```127.0.0.1 localhost devos.testsigma.com```
![Mapping URL](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/mappingurl.png)
Once this is done, you can save the host file and navigate to http://devos.testsigma.com/ui and see the below screen:
Once this is done, you can save the host file and navigate to https://devos.testsigma.com/ui and see the below screen:
![Access Testsigma](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/testsigma.png)
[[info | **NOTE**:]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ contextual_links:

---

Geolocation desired capability is a configuration used to set the geographic location for a web or mobile web during testing. This capability is helpful while testing location related web and mobile web features. This article discusses how to set Geolocation desired capabilities on the Ad-Hoc Run page in Testsigma.
The Geolocation Desired Capability sets the geographic location for web or mobile web apps during test executions. This capability is useful when testing location-specific features. This article discusses configuring the Geolocation Desired Capability on the Ad-Hoc Run page in Testsigma.

---

## **How to Set the Geolocation?**

In order to set the geolocation for a web or mobile web test, we can use the following desired capability:
To set the geolocation, use the following desired capability:

**browserstack.geoLocation = "&lt;Two-letter Country Code&gt;"**
**geoLocation = "&lt;Two-letter Country Code&gt;"**


For Example: <br>
<br>
**browserstack.geoLocation = "AR"**
### **Example:**

Here is the list of countries with their country codes that can be used in the value field for desired capability:
**geoLocation = "AR"**

|Country Name|Country Code|
Below is a list of countries with their corresponding two-letter country codes that can be used in the value field for the Geolocation desired capability:

|**Country Name**|**Country Code**|
|---|---|
|Argentina|AR|
|Australia|AU|
Expand Down Expand Up @@ -90,18 +90,17 @@ Here is the list of countries with their country codes that can be used in the v
---

## **Using Desired Capability to set the Location**
1. Click on **Run** from **Test Case Details** page.
![Run Test Case](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/glrun.png)

2. On **Ad-Hoc Run** overlay, click on **Desired Capabilities**.
![AdHoc Run](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/glahrun.png)
1. Click **Run** from **Test Case Details** page.
![Run Test Case](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/AdHoc_Run_DC.png)

2. On the **Ad-Hoc Run** overlay, click **Desired Capabilities**.
![AdHoc Run](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Desired_Capabilities_AdHoc_Page.png)

3. Enter ***BrowserStack.geoLocation*** in the **Key** field, select ***String*** as **Data type**, and set the **Value** as per country's country code.
![Desired Capability](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/gldc.png)
3. Enter ***geoLocation*** in the **Key** field, select ***String*** as **Data type**, and set the **Value** as per country's country code.
![Desired Capability](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Desired_Capabilities_GeoLocation.png)

4. Click on **Run Now** to execute the test case.
![Run Now](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/glrunnow.png)
4. Click **Run Now** to execute the test case.
![Run Now](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/RunNow_geoLocation.png)

Here’s a quick GIF demonstrating how to set geolocation desired capability.
![Geo Location Work Flow](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/GeoLocationWF.gif)
---
2 changes: 1 addition & 1 deletion src/pages/docs/open-source-docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ To achieve this we use Testsigma Agent that connects the Testsigma Server with t

### **Download and Install Testsigma Agent**

Login to https://local.testsigmaos.com/ui and follow the steps mentioned here([Setup: Windows, Mac, Linux](https://testsigma.com/docs//agent/setup-on-windows-mac-linux/)) to Install and configure the the Agent
Login to https://local.testsigmaos.com/ui and follow the steps mentioned here([Setup: Windows, Mac, Linux](https://testsigma.com/docs/agent/setup-on-windows-mac-linux/)) to Install and configure the the Agent

---

Expand Down
Loading

0 comments on commit 7f30cad

Please sign in to comment.