App-Prove-Plugin-Testrail.t 1009 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env perl
  2. use strict;
  3. use warnings;
  4. use Test::More 'tests' => 2;
  5. use Test::Fatal;
  6. use App::Prove;
  7. use App::Prove::Plugin::TestRail;
  8. #I'm the secret squirrel
  9. $ENV{'TESTRAIL_MOCKED'} = 1;
  10. #Test the same sort of data as would come from the Test::Rail::Parser case
  11. my $prove = App::Prove->new();
  12. $prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,run=TestingSuite,version=0.014,case_per_ok=1",'t/fake.test');
  13. is (exception {$prove->run()},undef,"Running TR parser case via plugin functions");
  14. #Check that plan, configs and version also make it through
  15. $prove = App::Prove->new();
  16. $prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,run=Executing the great plan,version=0.014,case_per_ok=1,plan=GosPlan,configs=testConfig",'t/fake.test');
  17. is (exception {$prove->run()},undef,"Running TR parser case via plugin functions works with configs/plans");