|
@@ -47,3 +47,30 @@ $prove = App::Prove->new();
|
|
|
$prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,plan=FinalPlan,run=FinalRun,configs=testConfig,version=0.014,case_per_ok=1,autoclose=1",'t/fake.test');
|
|
$prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,plan=FinalPlan,run=FinalRun,configs=testConfig,version=0.014,case_per_ok=1,autoclose=1",'t/fake.test');
|
|
|
|
|
|
|
|
is (exception {$prove->run()},undef,"Running TR parser with autoclose works correctly");
|
|
is (exception {$prove->run()},undef,"Running TR parser with autoclose works correctly");
|
|
|
|
|
+
|
|
|
|
|
+#Test multi-job upload shizz
|
|
|
|
|
+$prove = App::Prove->new();
|
|
|
|
|
+$prove->process_args("-PTestRail=apiurl=http://some.testlink.install/,user=someUser,password=somePassword,project=TestProject,plan=FinalPlan,run=FinalRun,configs=testConfig,step_results=step_results", '-j2', 't/fake.test', 't/skipall.test');
|
|
|
|
|
+
|
|
|
|
|
+is (exception {$prove->run()},undef,"Running TR parser -j2 works");
|
|
|
|
|
+
|
|
|
|
|
+my $tres = $prove->state_manager->results->{'tests'};
|
|
|
|
|
+subtest "Both step_result tracking and raw_output is correct (tests share parser internally)" => sub {
|
|
|
|
|
+ foreach my $test (keys %$tres) {
|
|
|
|
|
+ my $step_results = $tres->{$test}->{'parser'}->{'tr_opts'}->{'result_custom_options'}->{'step_results'};
|
|
|
|
|
+ my $toutput = $tres->{$test}->{'parser'}->{'raw_output'};
|
|
|
|
|
+ note $test;
|
|
|
|
|
+ if ($test eq 'skipall.test') {
|
|
|
|
|
+ unlike($toutput,qr/NOT SO SEARED AFTER ALL/i,"Test steps in full test output");
|
|
|
|
|
+ if (is(ref $step_results, 'ARRAY', "step_results is ARRAY ref")) {
|
|
|
|
|
+ is(scalar(@$step_results),0,"No steps to upload when doing skip_all");
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ like($toutput,qr/NOT SO SEARED AFTER ALL/i,"Test steps in full test output");
|
|
|
|
|
+ unlike($toutput,qr/SKIP/i,"Skip all info in full test output");
|
|
|
|
|
+ if (is(ref $step_results, 'ARRAY', "step_results is ARRAY ref")) {
|
|
|
|
|
+ is(scalar(@$step_results),2,"No steps to upload when doing skip_all");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|