Parcourir la source

Fix #103: Add explicit warnings about using duplicate nomenclature

George S. Baugh il y a 9 ans
Parent
commit
504fdeb3c4
2 fichiers modifiés avec 23 ajouts et 0 suppressions
  1. 13 0
      lib/App/Prove/Plugin/TestRail.pm
  2. 10 0
      lib/TestRail/API.pm

+ 13 - 0
lib/App/Prove/Plugin/TestRail.pm

@@ -52,6 +52,19 @@ See the documentation for the constructor of L<Test::Rail::Parser> as to why you
 When running prove in multiple job mode (-j), or when breaking out test jobs into multiple prove processes, auto-spawn of plans & runs can race.
 Be sure to extend your harness to make sure these things are already created if you do either of these things.
 
+Also, all parameters expecting names are vulnerable to duplicate naming issues.  Try not to use the same name for:
+
+    * projects
+    * testsuites within the same project
+    * sections within the same testsuite that are peers
+    * test cases
+    * test plans and runs outside of plans which are not completed
+
+To do so will result in the first of said item found.
+This might result in the reuse of an existing run/plan unintentionally, or spawning runs within the wrong project/testsuite or with incorrect test sections.
+Similarly, duplicate named tests will result in one of the dupes never being run (as the first found is chosen).
+
+
 =head1 OVERRIDDEN METHODS
 
 =head2 load(parser)

+ 10 - 0
lib/TestRail/API.pm

@@ -21,6 +21,16 @@ All the methods aside from the constructor should not die, but return a false va
 When the server is not responsive, expect a -500 response, and retry accordingly.
 I recommend using the excellent L<Attempt> module for this purpose.
 
+Also, all *ByName methods are vulnerable to duplicate naming issues.  Try not to use the same name for:
+
+    * projects
+    * testsuites within the same project
+    * sections within the same testsuite that are peers
+    * test cases
+    * test plans and runs outside of plans which are not completed
+
+To do so will result in the first of said item found being returned rather than an array of possibilities to choose from.
+
 =cut
 
 use 5.010;