Hi Dave, Please find the revised patch.
On Wed, Mar 22, 2017 at 5:09 PM, Dave Page <dp...@pgadmin.org> wrote: > Hi > > On Wed, Mar 22, 2017 at 6:03 AM, Navnath Gadakh > <navnath.gad...@enterprisedb.com> wrote: > > Hi Dave, > > > > Please find the patch for test result enhancement. > > What's in the patch: > > 1. The test result summary will store in JSON file. > > 2. Removed some redundant code from regression/test_utils.py > > 3. To print test scenario names in failed and skipped test cases, I > override > > apply_scenario() function in regression/test_utils.py > > When running with the patch: > > 1) The browser isn't closed, and the script never exits - it just sits > indefinitely at: > > ===== > Please check output in file: > /Users/dpage/git/pgadmin4/web/regression/regression.log > > make: *** [check] Error 1 > ===== > > without returning to a shell prompt. The browser exits when I hit Ctrl+C. > > 2) I get the following failures consistently: > > IndexConstraintGetTestCase (Fetch primary Key constraint of table, > Fetch unique Key constraint of table) > IndexConstraintDeleteTestCase (Delete primary Key constraint of table, > Delete unique Key constraint of table) > IndexConstraintUpdateTestCase (Update primary Key constraint of table, > Update unique Key constraint of table) > > runTest (pgadmin.browser.server_groups.servers.databases. > schemas.tables.constraints.index_constraint.tests.test_ > index_constraint_delete.IndexConstraintDeleteTestCase) > Delete primary Key constraint of table ... Traceback (most recent call > last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_ > groups/servers/databases/schemas/tables/constraints/ > index_constraint/tests/utils.py", > line 47, in create_index_constraint > pg_cursor.execute(query) > ProgrammingError: syntax error at or near "constraint" > LINE 1: ...onstraint_a7d98 ADD CONSTRAINT Delete primary Key constraint... > ^ > > FAIL > runTest (pgadmin.browser.server_groups.servers.databases. > schemas.tables.constraints.index_constraint.tests.test_ > index_constraint_delete.IndexConstraintDeleteTestCase) > Delete unique Key constraint of table ... Traceback (most recent call > last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_ > groups/servers/databases/schemas/tables/constraints/ > index_constraint/tests/utils.py", > line 47, in create_index_constraint > pg_cursor.execute(query) > ProgrammingError: syntax error at or near "Key" > LINE 1: ...ndexconstraint_a7d98 ADD CONSTRAINT Delete unique Key constr... > ^ > > FAIL > runTest (pgadmin.browser.server_groups.servers.databases. > schemas.tables.constraints.index_constraint.tests.test_ > index_constraint_get.IndexConstraintGetTestCase) > Fetch primary Key constraint of table ... Traceback (most recent call > last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_ > groups/servers/databases/schemas/tables/constraints/ > index_constraint/tests/utils.py", > line 47, in create_index_constraint > pg_cursor.execute(query) > ProgrammingError: syntax error at or near "Fetch" > LINE 1: ..._e7902.table_indexconstraint_569ed ADD CONSTRAINT Fetch prim... > ^ > > FAIL > runTest (pgadmin.browser.server_groups.servers.databases. > schemas.tables.constraints.index_constraint.tests.test_ > index_constraint_get.IndexConstraintGetTestCase) > Fetch unique Key constraint of table ... Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_ > groups/servers/databases/schemas/tables/constraints/ > index_constraint/tests/utils.py", > line 47, in create_index_constraint > pg_cursor.execute(query) > ProgrammingError: syntax error at or near "Fetch" > LINE 1: ..._e7902.table_indexconstraint_569ed ADD CONSTRAINT Fetch uniq... > ^ > > FAIL > runTest (pgadmin.browser.server_groups.servers.databases. > schemas.tables.constraints.index_constraint.tests.test_ > index_constraint_put.IndexConstraintUpdateTestCase) > Update primary Key constraint of table ... Traceback (most recent call > last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_ > groups/servers/databases/schemas/tables/constraints/ > index_constraint/tests/utils.py", > line 47, in create_index_constraint > pg_cursor.execute(query) > ProgrammingError: syntax error at or near "constraint" > LINE 1: ...onstraint_788bf ADD CONSTRAINT Update primary Key constraint... > ^ > > FAIL > runTest (pgadmin.browser.server_groups.servers.databases. > schemas.tables.constraints.index_constraint.tests.test_ > index_constraint_put.IndexConstraintUpdateTestCase) > Update unique Key constraint of table ... Traceback (most recent call > last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_ > groups/servers/databases/schemas/tables/constraints/ > index_constraint/tests/utils.py", > line 47, in create_index_constraint > pg_cursor.execute(query) > ProgrammingError: syntax error at or near "Key" > LINE 1: ...ndexconstraint_788bf ADD CONSTRAINT Update unique Key constr... > ^ > > FAIL > Resolved. > > > > I have also attached the sample JSON file with the test result. Tell me > any > > modification if any. > > I would suggest the following changes: > > - Use "tests_failed", "tests_passed" and "tests_skipped" for the names. > Done. > > - Add the error message/exception info etc. to the failed tests. > Done. > > "IndexConstraintGetTestCase": [ > {"Fetch primary Key constraint of table": "Fetch primary Key > constraint of table ... Traceback (most recent call last): > File \"/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_ > groups/servers/databases/schemas/tables/constraints/ > index_constraint/tests/utils.py\", > line 47, in create_index_constraint > pg_cursor.execute(query) > ProgrammingError: syntax error at or near \"Fetch\" > LINE 1: ..._e7902.table_indexconstraint_569ed ADD CONSTRAINT Fetch > prim..."} > ] > > - Add the reason tests were skipped to the skipped tests > Done. > > e.g. > > "SynonymGetTestCase": [ > {"Fetch synonym Node URL": "Synonyms not supported on PostgreSQL"} > ] > Thanks. > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- Regards, Navnath Gadakh EnterpriseDB Corporation The Enterprise PostgreSQL Company
tests_result_enhancement_v2.patch
Description: Binary data
-- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers