testrail-report.t 915 B

12345678910111213141516
  1. use strict;
  2. use warnings;
  3. use Test::More 'tests' => 4;
  4. my @args = qw{bin/testrail-report --apiurl http://testrail.local --user "test@fake.fake" --password "fake" --project "CRUSH ALL HUMANS" --run "SEND T-1000 INFILTRATION UNITS BACK IN TIME" --mock t/test_multiple_files.tap};
  5. my $out = `@args`;
  6. is($? >> 8, 0, "Exit code OK reported with multiple files");
  7. my $matches = () = $out =~ m/Reporting result of case/ig;
  8. is($matches,2,"Attempts to upload multiple times");
  9. @args = qw{bin/testrail-report --apiurl http://testrail.local --user "test@fake.fake" --password "fake" --project "CRUSH ALL HUMANS" --run "SEND T-1000 INFILTRATION UNITS BACK IN TIME" --case-ok --mock t/test_multiple_files.tap};
  10. $out = `@args`;
  11. is($? >> 8, 0, "Exit code OK reported with multiple files (case-ok mode)");
  12. $matches = () = $out =~ m/Reporting result of case/ig;
  13. is($matches,4,"Attempts to upload multiple times (case-ok mode)");