WWW::Testafy - Testafy API for perl developers
use WWW::Testafy; my $te = new WWW::Testafy; my $id = $te->run_test( pbehave => qq{ For the url http://www.google.com Given a test delay of 1 second When the search query field is "Testafy" Then the text "Did you mean: testify" is present }; ); my $passed = $te->test_passed($id); my $planned = $te->test_planned($id); print "Passed $passed tests out of $planned\n"; print $te->test_results_as_string($id);
Args: api_command - command to send to API server $request_vars - hashref of values to be encoded into JSON
Returns: HTTP::Response object received
Returns: value of 'message' key from JSON response
Returns: arrayref of error messages from JSON response
Returns: formatted error strings (joined with newlines)
If the asynchronous arg flag is set to 1, test is started in background. Otherwise, it waits for test to completed. The default is 0.
Args: %args - hash of arguments
Returns: trt_id of entry created for test
Args: trt_id - test_run_test_id for test
Returns: current status of the individual test run $trt_id.
Returns: tests planned for the individual test run $trt_id.
Returns: tests passed in individual test run $trt_id.
Returns: tests failed in individual test run $trt_id.
Returns: array of tests results. Each item in the array is an array ref of result_type & result.
Returns: test results as a single string, effectively in TAP format.
To install WWW::Testafy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Testafy
CPAN shell
perl -MCPAN -e shell install WWW::Testafy
For more information on module installation, please visit the detailed CPAN module installation guide.