NAME

TestRail::Utils - Utilities for the testrail command line functions, and their main loops.

VERSION

version 0.052

SCRIPT HELPER FUNCTIONS

help

Print the perldoc for $0 and exit.

userInput

Wait for user input and return it.

interrogateUser($options,@keys)

Wait for specified keys via userInput, and put them into $options HASHREF, if they are not already defined. Returns modified $options HASHREF. Dies if the user provides no value.

parseConfig(homedir)

Parse .testrailrc in the provided home directory.

Returns:

ARRAY - (apiurl,password,user)

getFilenameFromTapLine($line)

Analyze TAP output by prove and look for filename boundaries (no other way to figure out what file is run). Long story short: don't end 'unknown' TAP lines with any number of dots if you don't want it interpreted as a test name. Apparently this is the TAP way of specifying the file that's run...which is highly inadequate.

Inputs:

STRING LINE - some line of TAP

Returns:

STRING filename of the test that output the TAP.

TAP2TestFiles(file)

Returns ARRAY of TAP output for the various test files therein. file is optional, will read TAP from STDIN if not passed.

getRunInformation

Return the relevant project definition, plan, run and milestone definition HASHREFs for the provided options.

Dies in the event the project/plan/run could not be found.

getHandle(opts)

Convenience method for binaries and testing. Returns a new TestRail::API when passed an options hash such as is built by most of the binaries, or returned by parseConfig.

Has a special 'mock' hash key that can only be used by those testing this distribution during 'make test'.

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