فهرست منبع

Fix #32 - Forgot to pass run configurations apparently

George S. Baugh 10 سال پیش
والد
کامیت
bf2c81c75c
3فایلهای تغییر یافته به همراه14 افزوده شده و 3 حذف شده
  1. 3 0
      Changes
  2. 1 1
      dist.ini
  3. 10 2
      lib/TestRail/API.pm

+ 3 - 0
Changes

@@ -1,5 +1,8 @@
 Revision history for Perl module TestRail::API
 
+0.023 2015-05-13 TEODESIAN
+    - Fix issue where spawning runs in plans with configurations failed.
+
 0.022 2015-05-08 TEODESIAN
     - Fix issue where testrail-tests always attempted to turn test names into paths
 

+ 1 - 1
dist.ini

@@ -1,6 +1,6 @@
 name = TestRail-API
 main_module = lib/TestRail/API.pm
-version = 0.022
+version = 0.023
 author = George S. Baugh <teodesian@cpan.org>
 license = Perl_5
 copyright_holder = George S. Baugh

+ 10 - 2
lib/TestRail/API.pm

@@ -1545,15 +1545,23 @@ sub createRunInPlan {
     confess("Config IDs must be ARRAYREF") unless !defined($config_ids) || (reftype($config_ids) || 'undef') eq 'ARRAY';
     confess("Case IDs must be ARRAYREF") unless !defined($case_ids) || (reftype($case_ids) || 'undef') eq 'ARRAY';
 
+    my $runs = [
+        {
+            config_ids  => $config_ids,
+            include_all => defined($case_ids) ? 0 : 1,
+            case_ids    => $case_ids
+        }
+    ];
+
     my $stuff = {
         suite_id      => $suite_id,
         name          => $name,
         assignedto_id => $assignedto_id,
         include_all   => defined($case_ids) ? 0 : 1,
         case_ids      => $case_ids,
-        config_ids    => $config_ids
+        config_ids    => $config_ids,
+        runs          => $runs
     };
-
     my $result = $self->_doRequest("index.php?/api/v2/add_plan_entry/$plan_id",'POST',$stuff);
     return $result;
 }