Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Test-Suite and Test-Case regex combinations for running a subset of tests.

A The testing tool provides a wide variety of selection of test cases is possible. An example usage of the regex is listed belowto run. Some of the options are as follows :
Flags:
-s This flag is associated with test suite and It takes suite id defined with key "Id" as shown in below table.
-r This flag is associated with test case and It takes keys "Id" and "keyword" as shown in below table. The Id searches for the expression among all test Ids. And the keyword searches for the expression in the test names.
Absent of any flag or both flag will result in execution of all respective entities.

Sr.

Regex Pattern

Outcome

1

-s '"Id:[GET /accounts]' " -r "Id:'[.*]'"

Execute all test cases (.*) from the GET /accounts test suite only.
Test cases from other suites will not be attempted for execution.

2

-s '"Id:[GET /accounts]' " -r "Id:'[AIS_A001]'"

Execute only the test case AIS_A001 from the GET /accounts test suite.
All other test cases from the GET /accounts test suite will be skipped.
Test cases from other suites will not be attempted for execution.

3

-s '"Id:[GET /accounts]' " -r 'Id:'[00.[!AIS_A001]'

Execute all the tests test cases (.*) from the GET /accounts test suite which have the testId among one of 000, 001, 002, 003, 004, 005, 006, 007, 008, 009except the test whose Id is AIS_001.
Test cases from other suites will not be attempted for execution.

4

-s '"Id:[GET /accounts,GET /accounts/{accountId}/direct-debits,GET /customers]' ]" -r "Id:'[.*001]'"

Execute all only the test case from which has 001 in the 3 test -suitesId.
All other test cases from the GET /accounts test suite will be skipped.
Test cases from other suites will not be attempted for execution.

4

-s "Id:[GET /accounts

/{accountId}/direct-debitsGET /customers

]" -r "Id:[00.]"

Execute the test cases which has the test Id from 000 to 009.
All other test cases from the GET /accounts test suite will be skipped.
Test cases from other suites will not be attempted for execution.
Also note that do not place spaces after and before the commas

5

-s '"Id:[GET /accounts/{accountId}/customer,GET /accounts/{accountId},GET /accounts,GET /accounts/{accountId}/balances,GET /accounts/{accountId}/beneficiaries,GET /customer,GET /accounts/{accountId}/direct-debits,GET /accounts/{accountId}/products,GET /accounts/{accountId}/scheduled-payments,GET /accounts/{accountId}/standing-orders,GET /accounts/{accountId}/transactions,POST /customers/action/cop-query,Combined Future Dated Payment with Fixed Defined Schedule,Combined Future Dated Payments with Fixed On Demand,Combined Future Dated Payments with Fixed Periodic Schedule,Combined Future Dated Payment with Variable Defined Schedule,Combined Future Dated Payments with Variable On Demand,Combined Future Dated Payments with Variable Periodic Schedule,Combined Single Instant Payments with Fixed Defined Schedule,Combined Single Instant Payments with Fixed On Demand,Combined Single Instant Payments with Fixed Periodic Schedule,Combined Single Instant Payments with Variable Defined Schedule,Combined Single Instant Payments with Variable On Demand,Combined Single Instant Payments with Variable Periodic Schedule,Payment consent and file payments,Fixed Defined Schedule,Fixed On Demand,Fixed Periodic Schedule,future-dated-payments,get-report-file-payments,header-validations-tests,International Payments,Payment Consent Refund,single-instant-payments,Variable Defined Schedule,Variable On Demand,Variable Periodic Schedule,Consent/action/augment post request,Consent/action/validate post request,Insurance]' -r Id:'[.*]'

Run all the test cases in all the test suites.

Not providing regex flag '-r' will execute all the test cases for given suite Ids.

There are two keys which can be used to target specific test cases.
Id : - Id belongs to test Id , any pattern matching testId will get executed. For exclusion of any test case you can use '!' before test case id

Example regex values are :
‘Id:[AIS_A001]'
‘Id:[!AIS_A001]' → to exclude test case Id AIS_A001
'Id:[AIS_A001,AIS_A002]'
'Id:[AIS_A.*]'
'Id:[AIS_A.*,AIS_B.*]'
'Id:[AIS_A009,AIS_A001,AIS_A005]'

keyword (case insensitive): ‘keyword’ is any keyword which will match with string pattern in tests name. For exclusion of any test case you can use '!' before test case name.

Example regex values are :

‘keyword:[happy]'
'keyword:[!happy, header]' → here we are taking test cases which are negative (as happy have ‘!' before it) and which have word ‘header’ in it. Similarly we can exclude header just by adding '!’ before it. e.g, 'keyword:[!happy, !header]'

...

]" -r "keyword:[.*]"

Execute all test cases (.*) from the GET /accounts test suite only.
Test cases from other suites will not be attempted for execution.

6

-s "Id:[GET /accounts]" -r "keyword:[Happy]"

Execute all test cases from the GET /accounts test suite which have the word 'Happy' in their test name.
Test cases from other suites will not be attempted for execution.

-s "Id:[GET /accounts]" -r "Id:[00.], keyword:[Happy]"

Execute all test cases from the GET /accounts test suite which has the test Id from 000 to 009 and have the word 'Happy' in their test name.
Test cases from other suites will not be attempted for execution.

7

-s "Id:[GET /accounts]" -r 'Id:[00.], keyword:[!Happy]'

Execute all test cases from the GET /accounts test suite which have ‘001’ in there test case Ids and also does not have the word 'Happy' in their test name.
Test cases from other suites will not be attempted for execution.

8

-s "Id:[GET /accounts]" -r "keyword:[Happy]"

Execute all test cases from the GET /accounts test suite which have ‘Happy’ in there test name.

9

-s "Id:[GET /accounts]" -r ‘keyword:[!Happy, header]’

Execute all test cases from the GET /accounts test suite which does not have ‘Happy’ in there test name and also have 'header' in test name.

10

-s "Id:[GET /accounts]" -r "Id:[001,002,003]"

Execute all the tests from the GET /accounts test suite which have the testId among one of 001, 002, 003.

Test cases from other suites will not be attempted for execution.

11

-s "Id:[GET /accounts,GET /accounts/{accountId}/direct-debits,GET /customers]" -r "Id:[.*]"

Execute all the test case from the 3 test-suites.

  • GET /accounts

  • GET /accounts/{accountId}/direct-debits

  • GET /customers

Test cases from other suites will not be attempted for execution.
Also note that do not place spaces after and before the commas

12

-s "Id:[.*]" -r "Id:[.*]"

Run all the test cases in all the test suites.

13

If -s -r not provided then all test suits and test cases will get execute