TestRail::Utils::Lock - Pick high priority cases for execution and lock them via the test results mechanism.
version 0.049
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.
Pick and lock a test case in a TestRail Run, and return it if successful, confess() on failure.
testrail-lock's primary routine.
OPTIONS
HANDLE
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.
Lock the specified test, and return it's title (or full_title if it exists).
TEST
LOCK_STATUS_ID
Returns -1 in the event a lock could not occur, and warns & returns 0 on lock collisions.
Thanks to cPanel Inc, for graciously funding the creation of this module.
George S. Baugh <teodesian@cpan.org>
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
This software is copyright (c) 2021 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.
To install TestRail::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm TestRail::API
CPAN shell
perl -MCPAN -e shell install TestRail::API
For more information on module installation, please visit the detailed CPAN module installation guide.