The code in these scripts is provided on an "AS-IS" basis without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement. These scripts are provided for educational and demonstration purposes only, and should not be used in production. Issues regarding these scripts should be submitted through GitHub. These scripts are maintained by the Technical Services team at Sauce Labs.
Some examples in this repository, such as
headless, may require a different account tier beyond free trial. Please contact the Sauce Labs Sales Team for support and information.
Select the button below to try this demo in Gitpod
Click here to see how to setup your Sauce Labs credentials in Gitpod
$ git clone https://github.com/saucelabs-training/demo-java.git
Open a Terminal window (command prompt for Windows) and set your Sauce Labs Environment variables:
$ export SAUCE_USERNAME="username" $ export SAUCE_ACCESS_KEY="accessKey"
> set SAUCE_USERNAME="username" > set SAUCE_ACCESS_KEY="accessKey"
To set an environment variables permanently in Windows, you must append it to the
Go to Control Panel > System > Windows version > Advanced System Settings > Environment Variables > System Variables > Edit > New
Then set the "Name" and "Value" for each variable
Test the environment variables
$ echo $SAUCE_USERNAME $ echo $SAUCE_ACCESS_KEY
WARNING FOR UNIX USERS!: If you have problems setting your environment variables, run the following commands in your terminal:
$ launchctl setenv SAUCE_USERNAME $SAUCE_USERNAME $ launchctl setenv SAUCE_ACCESS_KEY $SAUCE_ACCESS_KEY
echo %SAUCE_USERNAME% echo %SAUCE_ACCESS_KEY%
$ mvn dependency:resolve
$ mvn test-compile
Finally, run the following test to see if you've properly configured the test environment:
$ mvn test -Dtest=Module2TestNGTest -pl on-boarding-modules/testng
If you wish to run a specific test/sub-module in this emusim_testng use the following command:
# for running a specific test: mvn test -Dtest=testname # for running a specific sub-module mvn test -pl subproject/