File tree Expand file tree Collapse file tree 6 files changed +33
-13
lines changed
Expand file tree Collapse file tree 6 files changed +33
-13
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ workflows:
2929 - copy-sample-configs :
3030 filters : *filters
3131 - testlio/schedule-run :
32- dryRun : true
32+ dry-run : true
3333 filters : *filters
3434 requires :
3535 - copy-sample-configs
Original file line number Diff line number Diff line change 55 "deviceTestType" : " SELENIUM_NODE" ,
66 "type" : " BROWSER" ,
77 "executionConfiguration" : {
8- "videoCapture" : true
8+ "videoCapture" : true ,
9+ "testArgs" : " --spec tests/login-test.ts"
910 }
1011 },
1112 "devices" : {},
Original file line number Diff line number Diff line change @@ -16,16 +16,25 @@ parameters:
1616 default : " ./project-config.json"
1717 description : |
1818 Specify path to the project config JSON file. Default is "./project-config.json".
19- dryRun :
20- description : when true it runs configuration validations without creating run
19+ test-args :
20+ type : string
21+ default : " "
22+ description : |
23+ Pass custom arguments to the test script in order to trigger a particular set of tests.
24+ This value will be passed as an environment variable to the test script and can be used as
25+ command-line arguments for test execution command. Example: "--spec tests/login-test.ts".
26+ dry-run :
2127 type : boolean
2228 default : false
29+ description : |
30+ When true it runs configuration validations without creating run.
2331steps :
2432 - run :
2533 name : Scheduling automated run
2634 environment :
27- DRY_RUN : << parameters.dryRun >>
35+ DRY_RUN : << parameters.dry-run >>
2836 RUN_API_TOKEN_ENV_NAME : << parameters.token >>
2937 TEST_CONFIG_PATH : << parameters.test-config >>
3038 PROJECT_CONFIG_PATH : << parameters.project-config >>
39+ TEST_ARGS : << parameters.test-args >>
3140 command : << include(scripts/create-run.sh) >>
Original file line number Diff line number Diff line change 1212 token : " TESTLIO_RUN_API_TOKEN"
1313 test-config : " ./functional-tests-folder/test-config.json"
1414 project-config : " ./functional-tests-folder/project-config.json"
15+ test-args : " --spec tests/login-test.ts"
Original file line number Diff line number Diff line change @@ -25,10 +25,18 @@ parameters:
2525 default : " ./project-config.json"
2626 description : |
2727 Specify path to the project config JSON file. Default is "./project-config.json".
28- dryRun :
29- description : when true it runs configuration validations without creating run
28+ test-args :
29+ type : string
30+ default : " "
31+ description : |
32+ Pass custom arguments to the test script in order to trigger a particular set of tests.
33+ This value will be passed as an environment variable to the test script and can be used as
34+ command-line arguments for test execution command. Example: "--spec tests/login-test.ts".
35+ dry-run :
3036 type : boolean
3137 default : false
38+ description : |
39+ When true it runs configuration validations without creating run.
3240steps :
3341 - when :
3442 condition : << parameters.attach-workspace >>
4149 - checkout
4250 - install
4351 - create-run :
44- dryRun : << parameters.dryRun >>
52+ dry-run : << parameters.dry-run >>
4553 token : << parameters.token >>
4654 test-config : << parameters.test-config >>
4755 project-config : << parameters.project-config >>
56+ test-args : << parameters.test-args >>
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ set -o xtrace
99
1010export RUN_API_TOKEN=${! RUN_API_TOKEN_ENV_NAME}
1111
12- if [ " $DRY_RUN " -eq 1 ] ; then
13- testlio create-run --dryRun --projectConfig " ${PROJECT_CONFIG_PATH} " --testConfig " ${TEST_CONFIG_PATH} "
14- else
15- testlio create-run --projectConfig " ${PROJECT_CONFIG_PATH} " --testConfig " ${TEST_CONFIG_PATH} "
16- fi
12+ OPTIONAL_ARGS=()
13+ [ " $DRY_RUN " -eq 1 ] && OPTIONAL_ARGS+=( " --dryRun" )
14+ [ -n " $TEST_ARGS " ] && OPTIONAL_ARGS+=( " --testArgs=' ${TEST_ARGS} ' " )
15+
16+ testlio create-run --projectConfig " ${PROJECT_CONFIG_PATH} " --testConfig " ${TEST_CONFIG_PATH} " " ${OPTIONAL_ARGS[@]} "
You can’t perform that action at this time.
0 commit comments