Browse Source

Fix #103: Add explicit warnings about using duplicate nomenclature

George S. Baugh 9 years ago
parent
commit
504fdeb3c4
2 changed files with 23 additions and 0 deletions
  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.
 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.
 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
 =head1 OVERRIDDEN METHODS
 
 
 =head2 load(parser)
 =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.
 When the server is not responsive, expect a -500 response, and retry accordingly.
 I recommend using the excellent L<Attempt> module for this purpose.
 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
 =cut
 
 
 use 5.010;
 use 5.010;