NAME
TestRail::Utils::Lock - Pick high priority cases for execution and lock them via the test results mechanism.
VERSION
version 0.046
DESCRIPTION
Lock a test case via usage of the test result field. Has a hard limit of looking for 250 results, which is the only weakness of this locking approach. If you have other test runners that result in such tremendous numbers of lock collisions, it will result in 'hard-locked' cases, where manual intervention will be required to free the case.
However in that case, one would assume you could afford to write a reaper script to detect and correct this condition, or consider altering your run strategy to reduce the probability of lock collisions.
pickAndLockTest(options,[handle])
Pick and lock a test case in a TestRail Run, and return it if successful, confess() on failure.
testrail-lock's primary routine.
- HASHREF
OPTIONS
- valid keys/values correspond to the long names of arguments taken by testrail-lock. - TestRail::API
HANDLE
- Instance of TestRail::API, in the case where the caller already has a valid object. -
There is a special key, 'mock' in the HASHREF that is used for testing. The 'hostname' key must also be passed in the options, as it is required by lockTest, which this calls.
Returns a HASHREF with the test, project, run and plan (if any) definition HASHREFs as keys. Also, a 'path' key will be set which has the full path to the test on disk, if match mode is passed, the case title otherwise.
If the test could not be locked, 0 is returned.
lockTest(test,lock_status_id,handle)
Lock the specified test, and return it's title (or full_title if it exists).
- HASHREF
TEST
- Test object returned by getTests, or a similar method. - INTEGER
LOCK_STATUS_ID
- Status used to denote locking of test - TestRail::API
HANDLE
- Instance of TestRail::API
Returns -1 in the event a lock could not occur, and warns & returns 0 on lock collisions.
SPECIAL THANKS
Thanks to cPanel Inc, for graciously funding the creation of this module.
AUTHOR
George S. Baugh <teodesian@cpan.org>
SOURCE
The development version is on github at https://github.com/teodesian/TestRail-Perl and may be cloned from git://github.com/teodesian/TestRail-Perl.git
COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by George S. Baugh.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.