Getting Started- Oxyge CLI

Oxygen CLI

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

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

    Selenium hub URL. Default is http://localhost:4444/wd/hub.

  • --reopen={true|false}

    Reopen browser on each iteration. Default is false.

Last updated