Skip to main content

Dai-CT Execution Command Line Interface

This feature lets you run multiple execution types easily from the terminal against Continuous Testing Cloud.

Installation

To install the package, run this following command (with sudo permissions):

npm install -g dai-ct

Configuration

The CLI must be configured before running it.

To configure the CLI, add a file named credentials.json in the root directory of the project. It needs to contain:

  • cloudUrl
  • accessKey

This file needs to be in json format. 

credentials.json Example Expand source

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

Run Cypress and Playwright Tests

You can run Cypress or Playwright projects.

Cypress and 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

NameMandatoryDescription
-p or --projectYesCypress project to run
-c or --confNoConfiguration file for the requested execution.

A file named digitalai.json (in json format) with the required configuration.

For more information, see : 



Start a Cypress Execution

Execute a Playwright Job

Run Cypress Command Example Expand source

dai-ct cypress run -p /Users/MyUser/Documents/cypressProject --conf digitalai.json

Run Playwright Command Example Expand source

dai-ct playwright run -p /Users/MyUser/Documents/playwrightProject --conf digitalai.json

Run Espresso and XCUITest Tests

You can run Espresso or XCUITest projects.

Espresso and 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

NameMandatoryDescription
-c or --confYesConfiguration file for the execution.

A file named conf.json (in json format) with the required parameters for the executions.

For more information see Running Async Espresso/XCUITest.



> [!INFO]

> Only the mandatory parameters are supported:

> * runningType

> * deviceQueries

> * appUrl

> * testAppUrl
-a or --appNo (only if appUrl is provided in the conf.json)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 Expand source

dai-ct espresso run -a /Users/MyUser/Documents/myApp.apk -t /Users/MyUser/Documents/myTests.apk -c conf.json 

Run XCUITest Command Example Expand source

dai-ct xcuitest run -a /Users/MyUser/Documents/myApp.ipa -t /Users/MyUser/Documents/myTests.zip -c conf.json 

conf.json Example Expand source

{
"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
}