Page tree
Skip to end of metadata
Go to start of metadata

Enables running multiple execution types easily from terminal against continuous testing cloud.

CLI Installation

To install the package please run the following command:

npm install dai-ct


CLI Configuration

In order to execute dai-ct CLI, a credentials.json file must be supplied.

Add a file named credentials.json in the root directory of the project, it needs to contain:

  1. cloudUrl
  2. accessKey

This file needs to be in json format. 

credentials.json Example
{
  "cloudUrl" : "https://mycloud.experitest.com",
  "accessKey" : "myAccessKey"
}


Running Cypress/Playwright Tests

Enables users to run Cypress or Playwright projects.

Cypress/Playwright projects are run asynchronously, the response received is immediate

dai-ct cypress run -p or --project <path to the project> -c or --conf <path to conf file>
dai-ct playwright run -p or --project <path to the project> -c or --conf <path to conf file>


Parameters

Name

Mandatory

Description

-p or --projectYes

The Cypress project to run

-c or --confNo

A configuration file for the requested execution.
A file named digitalai.json (in json format) with the required configuration.
for more information: 

Run Cypress Command Example
dai-ct cypress run -p /Users/MyUser/Documents/cypressProject --conf digitalai.json
Run Playwright Command Example
dai-ct playwright run -p /Users/MyUser/Documents/playwrightProject --conf digitalai.json

Running Espresso/XCUITest Tests

Enables users to run Espresso or XCUITest projects.

Espresso/XCUITest projects are run asynchronously, the response received is immediate

dai-ct espresso run -a or --app <path to the app> -t or --testApp <path to the test app file> -c or --conf <path to conf.json file>
dai-ct xcuitest run -a or --app <path to the app> -t or --testApp <path to the test app file> -c or --conf <path to conf.json file>

Parameters

Name

Mandatory

Description

-c or --confYes

A configuration file for the requested execution.
A file named conf.json (in json format) with the required parameters for the executions.
for more information: Manage Test Run with the API#RunningAsyncEspresso/XCUITest

Only the mandatory parameters are supported for now:

  • runningType
  • deviceQueries
  • appUrl
  • testAppUrl
-a or --appNo (only if appUrl is provided in the conf.json)

The application under test

-t or --testAppNo (only if testAppUrl is provided in the conf.json)espresso / XCUI tests(.zip extension only)
Run Espresso Command Example
dai-ct espresso run -a /Users/MyUser/Documents/myApp.apk -t /Users/MyUser/Documents/myTests.apk -c conf.json 
Run XCUITest Command Example
dai-ct xcuitest run -a /Users/MyUser/Documents/myApp.ipa -t /Users/MyUser/Documents/myTests.zip -c conf.json 
conf.json Example
{
  "runningType": "coverage", //Mandatory
  "deviceQueries" : "@os='android'", //Mandatory
  "appUrl" : "https://actualapp.apk", //Not Mandatory if App argument is given in cli
  "testAppUrl" : "https://testapp.apk" //Not Mandatory if TestApp argument is given in cli
}
  • No labels