Code Monkey home page Code Monkey logo

demo-java's Introduction

Java Demonstration Scripts

Codacy Badge CircleCI

The demo scripts in this repository allow you to run simple automated tests in order to validate your Java Selenium environment and your saucelabs.com account credentials.

Disclaimer:

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 appium-example, parallel-testing, and headless, may require a different account tier beyond free trial. Please contact the Sauce Labs Sales Team for support and information.

Solution Outline

Web automation

Mobile automation

Mobile Testing with Appium and iOS Tutorial(Introduction)

Real Devices

Emulators and Simulators

Visual E2E automation

Prerequisites

Select the button below to try this demo in Gitpod

Click here to see how to setup your Sauce Labs credentials in Gitpod


Project Setup


Import the Project

  1. Create a directory on your machine.
  2. Clone this repository into said directory.
    $ git clone https://github.com/saucelabs-training/demo-java.git
    
  3. Import the project into your IntelliJ (or IDE of your choice) as a Maven Project.
  4. Click through the prompts, and confirm when it asks to Import from Sources
  5. Choose the demo-java directory as the root directory of the project.

Set Your Sauce Labs Credentials

  1. Copy your Sauce Labs username and accessKey in the User Settings section of the Sauce Labs Dashboard.

  2. Open a Terminal window (command prompt for Windows) and set your Sauce Labs Environment variables:

    Mac OSX:
    $ export SAUCE_USERNAME="username"
    $ export SAUCE_ACCESS_KEY="accessKey"
    
    Windows:
    > set SAUCE_USERNAME="username"
    > set SAUCE_ACCESS_KEY="accessKey"
    

    To set an environment variables permanently in Windows, you must append it to the PATH variable.

    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

  3. Test the environment variables

    Mac OSX:
    $ 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
    
    Windows:
    > echo %SAUCE_USERNAME%
    > echo %SAUCE_ACCESS_KEY%
    

Run a Maven Test

  1. Run the following command to update any package dependencies:

    $ mvn dependency:resolve
    
  2. Then run the following command to compile your test code:

    $ mvn test-compile
    
  3. 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/
    

demo-java's People

Contributors

nadvolod avatar titusfortner avatar tacktician avatar neilgoldman avatar ndmanvar avatar mehmetg avatar mehmetg-sauce avatar joshmgrant avatar halkeye avatar eyaly avatar llaskin avatar mmerrell-sauce avatar redmed86 avatar aldi-poc avatar gil-sauce avatar kevinmarkvi avatar codacy-badger avatar colinsauce avatar dylanlacey avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.