TestRail::Bin::Lock - Lock a test in a TestRail, and return the test name if successful.
version 0.052
# Lock a group of tests and execute them testrail-tests [OPTIONS] | xargs testrail-lock [OPTIONS] | xargs prove -PTestrail=... require `which testrail-lock`; TestRail::Bin::Lock::run('args' => \@args);
testrail-lock - pick an untested/retest test in TestRail, lock it, and return the test name if successful.
It is useful to lock the test in situations where you have multiple disconnected test running processes trying to allocate resources toward testing outstanding cases so that effort is not duplicated. This is accomplished via setting a special locking result on a test rather than simple assignment, as detecting lock conflicts is impossible then due to a lack of assignment history. Results, however have a history of results set, so we use that fact to detect if a locking collision occurred (race condition) and fail to return a result when another process locked during our attempt to lock.
Will respect test priority when making the choice of what test to lock.
Can also be used as the modulino TestRail::Bin::Lock. Has a single 'run' function which accepts a hash with the 'args' parameter being the array of arguments.
--apiurl : full URL to get to TestRail index document
--password : Your TestRail Password, or a valid API key (TestRail 4.2 and above).
--user : Your TestRail User Name.
-j --project : desired project name.
-r --run : desired run name.
-l --lockname : internal name of lock status.
All mandatory options not passed with the above switches, or in your ~/.testrailrc will be prompted for.
-p --plan : desired plan name. Required if the run passed is a child of a plan.
-m --match : attempt to find filenames matching the test names in the provided directory.
--no-match : attempt to find filenames that do not match test names in the provided directory.
-n --no-recurse : if match (or no-match) passed, do not recurse subdirectories.
-t --case-type : Only attempt to lock cases of the specified type. May be passed multiple times.
-e --encoding : Character encoding of arguments. Defaults to UTF-8. See Encode::Supported for supported encodings.
-c --config : configuration name to filter plans in run. Can be passed multiple times.
In your $HOME, (or the current directory, if your system has no concept of a home directory) put a file called .testrailrc with key=value syntax separated by newlines. Valid Keys are the same as documented by App::Prove::Plugin::TestRail. All options specified thereby are overridden by passing the command-line switches above.
--help : show this output
Thanks to cPanel Inc, for graciously funding the creation of this distribution.
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) 2022 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.