Testlio platform CLI
Command-line interface to interact with Testlio platform
Installation
npm install -g @testlio/cli
Commands
create-run
This command allows automated test runs to be scheduled.
Usage
Usage: testlio create-run
Options:
--projectConfig [path] path to project config (default: project-config.json)
--testConfig [path] path to test config (default: test-config.json)
--pollResults enables polling for run results
--testArgs arguments to be passed to the test script execution command
--dryRun omit the actual run creation (used for testing)
Configuration
-
Set env variable RUN_API_TOKEN
. While running the command, this env variable is necessary in order to create and schedule automated-tests.
-
Add to your project file project-config.json
. Project config file contains the static configuration related to the project which will not change for a workspace:
{
"baseURI": "URI to api server (e.g https://api.testlio.net)",
"platformURI": "URI to platform (e.g https://app.testlio.net/tmt/project/)",
"projectId": "project id, this can be found while generating token (e.g 5313)",
"automatedRunCollectionGuid": "this can be found while generating token (e.g cb0282d4-c594-496a-a474-29eeef926c79)",
"testRunCollectionGuid": "this can be found while generating token (e.g 69ad9833-a976-4dd4-b262-c6e0287f40a9)",
"workspaceName": "this can be found while generating token (e.g strawberries-ios)"
}
-
Add to your project file test-config.json
. Test config file contains the configurations that the customer will configure in order to create and trigger automated tests:
{
"automatedTestNamePrefix": "Prefix you want to append with the automated test (e.g Circle CI:)",
"config": {
"deviceAppType": "Type of test you want to schedule (e.g WEB)",
"deviceTestType": "Test Programming language you want to select (e.g SELENIUM_NODE)",
"type": "Test type (e.g BROWSER)",
"executionConfiguration": {
"videoCapture": true
}
},
"devices": {
"guids": [
"Device guids list (e.g 615295a9-52fb-4781-9c53-480ec292b4eb)",
"(e.g c4ab6b8a-c107-4654-a9d3-0f49fdc1cecf)"
],
"oses": [
"Devices OS list (e.g 14.6)",
"(e.g 9)"
],
"manufacturers": [
"Devices manufacturers list (e.g Apple)",
"(e.g Samsung)"
],
"names": [
"Devices names list (e.g Apple iPhone X)",
"(e.g Samsung Galaxy A7)"
],
"formFactors": [
"Device form factors, acceptable values are:",
"DEVICE",
"TABLET"
]
},
"browsers": {
"guids": [
"Browser guids list (e.g 615295a9-52fb-4781-9c53-480ec292b4eb)",
"(e.g c4ab6b8a-c107-4654-a9d3-0f49fdc1cecf)"
],
"browserNames": [
"Browsers names list, acceptable values are:",
"chrome",
"firefox",
"MicrosoftEdge"
],
"platformNames": [
"OS platforms names list, acceptable values are:",
"windows"
],
"versions": [
"Browser versions list, acceptable values are:",
"latest",
"latest-1",
"latest-2"
]
},
"select": "A number of devices or browsers to be used (e.g. 2)",
"testPackageURI": "Path to the test package itself (e.g ./test_package.zip)",
"buildURI": "Path to the build (e.g ./android_build.apk)"
}