Re: pgAdmin4: Test result enhancement patch

From: Navnath Gadakh <navnath(dot)gadakh(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Kanchan Mohitey <kanchan(dot)mohitey(at)enterprisedb(dot)com>
Subject: Re: pgAdmin4: Test result enhancement patch
Date: 2017-03-24 15:13:19
Message-ID: CAOAJCYoP-rezOL1E=bqUP0-tLOqx_9i2X1HP8e-rCAsC8g1m0Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave,

Please find the revised patch.

On Wed, Mar 22, 2017 at 5:09 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> On Wed, Mar 22, 2017 at 6:03 AM, Navnath Gadakh
> <navnath(dot)gadakh(at)enterprisedb(dot)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

Attachment Content-Type Size
tests_result_enhancement_v2.patch application/octet-stream 16.3 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-03-24 15:40:53 Re: pgAdmin4: Test result enhancement patch
Previous Message Dave Page 2017-03-24 14:45:05 Re: Patch for Feature #1344 Can't use multiple monitors (Windows 10)