Test on Internal Networks
Run Gauge tests on your privately hosted websites using BrowserStack Automate
BrowserStack enables you to run your Gauge automated tests on your internal development environments, on localhost, and from behind a corporate firewall. This feature is called “Local Testing”.
Local Testing establishes a secure connection between your machine and the BrowserStack cloud. Once you set up Local Testing, all URLs work out of the box, including HTTPS URLs and those behind a proxy or firewall.
Configuring your Gauge tests for Local Testing takes just a few simple steps:
- Clone the gauge-java-browserstack repo on GitHub with BrowserStack’s sample test (if not already done):
git clone https://github.com/browserstack/gauge-java-browserstack.git cd gauge-java-browserstack
- Install the dependencies using the following command:
mvn compile
- Update
default.properties
file within thegauge-java-browserstack/env/default/
directory with your BrowserStack credentials as shown below:
# The credentials associated with your BrowserStack account. BROWSERSTACK_USERNAME = YOUR_USERNAME BROWSERSTACK_ACCESS_KEY = YOUR_ACCESS_KEY
- Download the appropriate BrowserStack Local binary:
- OS X
- Linux 32-bit
- Linux 64-bit
-
Windows
The download links are secure. The binaries are digitally signed, identifying the publisher as BrowserStack Ltd. Read more about our security.
- Navigate to the folder containing the binary, and run it from the command line.
For macOS, run the below code in terminal:
./BrowserStackLocal --key YOUR_ACCESS_KEY
For Windows, run the below code in Command Prompt:
BrowserStackLocal.exe --key YOUR_ACCESS_KEY
- Once the connection is established, enable Local Testing in
gauge-java-browserstack/src/test/java/com/browserstack/gauge/pages/DriverFactory.java
file by setting thebrowserstack.local
capability totrue
.
// Hardcoded capabilities caps.setCapability("build", "FirstGaugeBuild"); caps.setCapability("browserstack.debug", "true"); caps.setCapability("browserstack.local", "true");
- You can now run your Gauge test using BrowserStack Local with the following command:
mvn test
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!