OXYGEN
HomeGitHubReleasesCommunity
  • Welcome to Oxygen
  • About
    • What is Oxygen?
    • Getting Started (Videos)
      • Oxygen IDE Controls Overview
      • Recording a Web Test
      • Oxygen Commands Explained
    • Getting help
  • Download and work with Oxygen
    • Download & Installation
      • Oxygen IDE Installation
      • Oxygen for Mobile Installation
      • Oxygen for Windows Desktop Automation Setup
      • Oxygen for Mac Installation
        • Mac Installation Troubleshooting
      • Oxygen CLI Installation
      • Java Installation Instructions
      • Recording Troubleshooting
    • Start working with Oxygen
      • Getting Started - Web
        • Introduction - Web Testing
        • Recording a Web Test
        • Creating a Web Test
        • Sample Project - Web Test
      • Getting Started - Mobile
        • Introduction - Mobile Testing
        • Recording a Test on Mobile
        • Creating a Test - Mobile
        • Sample Project - Mobile
      • Getting Started - Oxygen for Windows Desktop Automation
      • Getting Started- Oxyge CLI
        • Running a Test Script on Windows
        • Running Multiple Tests (Suites) on Windows
    • Oxygen Modules
      • assert
      • date
      • db
      • email
      • eyes
      • http
      • log
      • mailinator
      • mob
      • pdf
      • proxy
      • serial
      • shell
      • soap
      • twilio
      • utils
      • web
      • win
    • Test Parameters
  • Cloud Providers
    • Sauce Labs
    • Lambda Test
    • TestObject
  • Advanced programming in Oxygen
    • Project Configuration
    • Locating Elements
    • Page Objects
    • Environments
    • Code Components
Powered by GitBook
On this page
  • Oxygen CLI
  • Introduction
  • Usage

Was this helpful?

  1. Download and work with Oxygen
  2. Start working with Oxygen

Getting Started- Oxyge CLI

PreviousGetting Started - Oxygen for Windows Desktop AutomationNextRunning a Test Script on Windows

Last updated 5 years ago

Was this helpful?

Oxygen CLI

For Oxygen-CLI download instructions - please refer to the .

Introduction

Oxygen CLI is a command-line application for running test cases and test suites. It's intended mainly for integration with CI and build systems, but can be used as well for running scripts manually from the command-line. The results are produced as a set of XML/HTML/Excel/JSON/PDF reports plus the screenshots in case of test failures.

Usage

oxygen [OPTIONS]... FILE

Oxygen CLI can execute two types of files - test scripts (refered to as test cases) and test suites. Test suite allows defining and running collection of test cases.

Example of test suite for desktop web applications (Selenium):

{
  "iterations": 2,
  "parallel": 1,
  "url": "http://localhost:4444/wd/hub",
  "cases": [
    {
      "name": "case1",
      "path": "./testcase1.js"
    },
    {
      "name": "case2",
      "path": "./testcase2.js"
    }
  ],
  "environment": {
    "some_parameter": "foo",
    "another_parameter": "bar"
  },
  "capabilities": [
    {
      "browserName": "ie"
    },
    {
      "browserName": "chrome"
    }
  ],
  "options": {
    "autoReopen": true
  }
}

Example of test suite for mobile applications (Appium):

{
  "iterations": 2,
  "parallel": 1,
  "server": {
    "host": "localhost",
    "port": 4723
  },
  "cases": [
    {
      "name": "case1",
      "path": "./testcase1.js"
    },
    {
      "name": "case2",
      "path": "./testcase2.js"
    }
  ],
  "environment": {
    "some_parameter": "foo",
    "another_parameter": "bar"
  },
  "capabilities": [
    {
      "platformName": "Android",
      "platformVersion": "4.2",
      "deviceName": "90a92348",
      "appPackage": "com.sec.android.app.popupcalculator",
      "appActivity": "com.sec.android.app.popupcalculator.Calculator"
    },
    {
      "platformName": "Android",
      "platformVersion": "5.0",
      "deviceName": "ef4718a9",
      "appPackage": "com.sec.android.app.popupcalculator",
      "appActivity": "com.sec.android.app.popupcalculator.Calculator"
    }
  ]
}

General Options

  • --rf={html|xml|excel|pdf|junit|json}

    Format of the test reports. Default is html. Reports will be generated in the same directory where test script is located.

  • --ro=PATH

    Output path for the report file. If specified, the report file will be simply generated in the specified directory and will overwrite any previous reports. If omitted, then report will be generated using date-time folder structure. This is the default behavior.

  • -i, --iter=COUNT

    Number of times (iterations) to run the test. Default is 1.

  • -p, --param=FILE

    Parameters file. If not specified an attempt will be made to load parameters from a file named same as the test script, located in the same directory, and having extension - xlsx, xls, csv, or txt.

  • --pm={seq|random|all}

    Order in which to read the parameters - sequential, random, all. Default is seq. In seq and random modes test will run exact number of times specified with the -i option. In all mode, all available parameters will be read sequentially. This option is mutually exclusive with -i option.

Options for Web test

  • -b, --browser={chrome|ie|firefox|safari}

    Browser name. Default is chrome.

  • -s, --server=SERVER_URL
  • --reopen={true|false}

    Reopen browser on each iteration. Default is false.

Selenium hub URL. Default is .

Download Page
http://localhost:4444/wd/hub