NAME

TestRail::Bin::Results - List results for specified test(s).

VERSION

version 0.052

SYNOPSIS

testrail-results [OPTIONS] test1 test2 ...

require `which testrail-results`;
TestRail::Bin::Results::run('args' => \@args);

DESCRIPTION

testrail-results - List results for specified test(s).

Searches across multiple runs (and projects) for results for broad-based metrics; especially useful for diagnosing unreliable tests, and establishing defect density for certain features.

Can be used as the modulino TestRail::Bin::Tests. Has a single 'run' function which accepts a hash with the 'args' parameter being the array of arguments.

WARNING

Searching across all projects can take a very long time for highly active TestRail Installations. However, cross project metrics are also very useful.

As such, the results from prior searches in json mode may be provided, and the runs previously analyzed therein will not be investigated again.

It is up to the caller to integrate this data into their analysis as may be appropriate.

PARAMETERS:

MANDATORY PARAMETERS

    --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.

All mandatory options not passed with the above switches, or in your ~/.testrailrc will be prompted for.

SEMI-OPTIONAL PARAMETERS

    -e --encoding : Character encoding of arguments. Defaults to UTF-8. See Encode::Supported for supported encodings.

OPTIONAL PARAMETERS

    -j --project : Restrict search to provided project name. May be passed multiple times.

    -r --run : Restrict search to runs with the provided name. May be passed multiple times.

    -p --plan : Restrict search to plans with the provided name. May be passed multiple times.

    -g --grep : Restrict results printed to those matching the provided pattern. Great for looking for specific failure conditions.

    -v --version : Restrict results printed to those tested on the provided version(s). May be passed multiple times.

    -d --defect : Restrict results printed to those related to the provided defect(s). May be passed multiple times.

    -c --cachefile : Load the provided file as a place to pick up your search from. May be passed multiple times.

    -f --fast : Reduce the number of required HTTP requests at the cost of historical data (previous statuses in runs). Speeds up gathering a great deal when checking many tests.

    --json : Print results as a JSON serialization.

    -m --merged : In merge the output with the cached data provided (if any).

    --perfile : Output JSON summary data per file to the provided directory when in json mode

CONFIGURATION FILE

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.

MISCELLANEOUS OPTIONS:

    --help : show this output

NOTES

One of the primary purposes of this script is to create CPANTesters style matrices per version/platform. In --json mode, the 'versions_by_status' attribute will return a data structure looking like so:

platform_ids: a comma separated value of the platform IDs the test was run on (sorted to prevent order oddities). This value is a hash key.
versions: the direct version string reported. This key corresponds to an array value holding hashrefs with status IDs pointing towards result links, sorted by ID.

The consumer of this should be able to render a color-coded table, much like CPANTesters does.

SPECIAL THANKS

Thanks to cPanel Inc, for graciously funding the creation of this distribution.

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) 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.