PTL test tags let you list or execute a category of similar or related test cases across test suites in test directories. To include a test case in a category, tag it with the “@tags(<tag_name>)” decorator. Tag names are case-insensitive. See the pbs_benchpress page for how you can use tags to select tests. Tag Name Description 1 smoke Tests related to basic features of PBS, such as job or reservation submission/execution/tracking, etc. 2 server Test related to server features exclusively. Ex: server requests, receiving & sending job for execution etc. 3 sched Tests related to scheduler exclusively. Ex: tests related to scheduler daemon, placement of jobs, implementation of scheduling policy etc. 4 mom Tests related to mom, i.e. processing of jobs received from server and reporting back etc. Ex: Mom polling etc. 5 comm Tests related to communication between server, scheduler and mom. 6 hooks Tests related to server hooks or mom hooks 7 reservations Tests related to reservations 8 configuration Tests related to any PBS daemon configurations. 9 accounting Tests related to accounting logs 10 scheduling_policy Tests related to job scheduling policy of the scheduler - 11 multi_node Tests involving more than one node complex 12 commands Tests related to PBS commands and its outputs (Client related) 13 security Tests related to authentication, authorisation etc. 14 windows Tests that can run only on windows platform 15 cray Tests that can run only on cray platform 16 cpuset Tests that can run only on cpuset system Examples of tagging test cases: All the test cases of pbs_smoketest.py are tagged with “smoke”. >>>>> Multiple tags can be specified, as shown here: Use the --tags-info option to list the test cases with a specific tag. For example, to find test cases tagged with "smoke": pbs_benchpress --tags-info --tags=smoke To find a test case of a particular feature: Ex: Find a ASAP reservations test case ex. pbs_reservations.py ex. pbs_benchpress -t TestFunctional -i pbs_benchpress -t TestReservations -i –verbose pbs_benchpress --tags-info--tags=reservations --verbose The same command can be used to list tests inside the directories. Ex: All reservations tests inside performance directory To add a new test case of a particular feature or bug fix: Ex: A test case for a bug fix that updated accounting logs ex. In Functional test directory any test file / test suites associated with “log”. If present, add test case into that test suite ex. pbs_benchpress -t TestFunctional -i If the test case seems to belong to any of the features listed in tag list, it can be tagged so. Ex. @tags(‘accounting’) Use the --tags option to execute the test cases, including hierarchical tests, tagged with a specific tag. For example, to execute the test cases tagged with "smoke": pbs_benchpress --tags=smoke Ex: All scheduling_policy tests pbs_benchpress --tags=scheduling_policy pbs_benchpress -t <suite names> Pre-defined PTL Test Tags
Tagging Test Cases
@tags('smoke')
class SmokeTest(PBSTestSuite)
>>>>>
>>>>>
@tags(‘smoke’, ’mom’, ’configuration’)
class Mom_fail_requeue(TestFunctional)
>>>>>Using Tags to List Tests
Finding Existing Tests
Placing New Tests in Correct Location
Using Tags to Run Desired Tests
Manage space
Manage content
Integrations