Hello Hackers,

To chase down a set of tests that were failing together, we wanted to run
deeper trees of tests. We changed the behavior of the --pkg argument to
runtests.py so it runs tests under a package and its subpackages, instead
of for a single node.

It gave us more flexibility in what tests to run. This complements the
--exclude behavior we are working on.

To run tests for a single node, ".tests" can be appended to the package
path (see changes to README)

George & Tira
commit caa1e3e69fefc6172d54f21d42c13686b858c4f9
Author: George Gelashvili and Tira Odhner <pair+ggelashvili+aodh...@pivotal.io>
Date:   Tue Feb 7 17:44:46 2017 -0500

    when running tests, --pkg is no longer shallow by default

diff --git a/web/regression/README b/web/regression/README
index 8cc29987..cfd467d2 100644
--- a/web/regression/README
+++ b/web/regression/README
@@ -115,10 +115,18 @@ Execution:
      run 'python runtests.py --pkg all' or just:
          'python runtests.py'
 
+- Execute test framework for entire package
+
+     Example 1) Run test framework for 'browser' package
+     run 'python runtests.py --pkg browser'
+
+     Example 2) Run test framework for 'database' package
+     run 'python runtests.py --pkg browser.server_groups.servers.databases'
+
 - Execute test framework for single node at a time
 
      Example 1) Run test framework for 'browser' node
-     run 'python runtests.py --pkg browser'
+     run 'python runtests.py --pkg browser.tests'
 
      Example 2) Run test framework for 'database' node
-     run 'python runtests.py --pkg browser.server_groups.servers.databases'
+     run 'python runtests.py --pkg 
browser.server_groups.servers.databases.tests'
diff --git a/web/regression/runtests.py b/web/regression/runtests.py
index 272e3802..e5549751 100644
--- a/web/regression/runtests.py
+++ b/web/regression/runtests.py
@@ -142,7 +142,7 @@ def get_test_modules(arguments):
     if arguments['pkg'] is None or arguments['pkg'] == "all":
         TestsGeneratorRegistry.load_generators('pgadmin')
     else:
-        TestsGeneratorRegistry.load_generators('pgadmin.%s.tests' %
+        TestsGeneratorRegistry.load_generators('pgadmin.%s' %
                                                arguments['pkg'])
 
     # Sort module list so that test suite executes the test cases sequentially
@@ -163,7 +163,7 @@ def add_arguments():
 
     parser = argparse.ArgumentParser(description='Test suite for pgAdmin4')
     parser.add_argument('--pkg', help='Executes the test cases of particular'
-                                      ' package')
+                                      ' package and subpackages')
     arg = parser.parse_args()
 
     return arg
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to