Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP90w-0005AQ-K6 for pgadmin-hackers@arkaria.postgresql.org; Mon, 18 Jul 2016 13:55:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bP90w-0008Qp-12 for pgadmin-hackers@arkaria.postgresql.org; Mon, 18 Jul 2016 13:55:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bP90v-0008QV-BB for pgadmin-hackers@postgresql.org; Mon, 18 Jul 2016 13:55:17 +0000 Received: from mail-vk0-x230.google.com ([2607:f8b0:400c:c05::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bP90p-0006z8-Tn for pgadmin-hackers@postgresql.org; Mon, 18 Jul 2016 13:55:16 +0000 Received: by mail-vk0-x230.google.com with SMTP id x130so239522897vkc.0 for ; Mon, 18 Jul 2016 06:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1ZQW+Akuh0y82W5DdDShyLG8KN4jwIe1JSbNQbRDjaA=; b=B8GFdYuiJ3q7834Ig4m7JUtoFr+M2y22vAeYbXO9GSV8Sh4vPkYD3qdOOUoOPuJyKT cbBZ9E4KuKfMScW3qAjlwLI9vY7bmYSuXsLPbaghZp8ZrXtuhpO9TOq03NAIzK4PgosA FNAysc4/mP2j/vFrQpTYZNeusLZOSNsIrj2MtLl5v2eq0bMP9nV6Lx091vWtZ6Kw9Hhq I1FtpMiKdam9YrLo7VbHvqq9Wy8R6MTlE32cx7IE7MaaVyyZqKWyTNGK3b8EA1kVAd8I dk1/+YvdypXvftqmq5WChlQbl5uShry7Vk3QrwL4ktZEb749jXepS2lxjSIQQAvE0W4d 5mKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1ZQW+Akuh0y82W5DdDShyLG8KN4jwIe1JSbNQbRDjaA=; b=Fi/7r8qVlA9trFcQexQzXz1ohMcPXvwBdCGfnGEk6sZDlC3+q5vKj2VKJwMYfFRfZK AmyHVJ2bSZaaW67FBpUMNCoX6+m6QAMUFXS/zY0Z0rrisIDlR9u582tKlBXa6djPYqMT QIWUAMpN5Im0NgzGCAjoy2eBUNLlVMUmNKmubZwOBko3y9i2c1MyeJdw9wRYc38i98mx eav0D+yKKcoNlk2BcfELCrEC7f/BLfVwSsCZpTkFc7jZB9qGQJoqzk3Cg1bnvTjf46gR 2XMnm32wSLBFe3zHb7IfMUS48/jc+guMslNeeU5/ai4fxAOoOmIx3Nt4TAVYvvKcmnqp lBnQ== X-Gm-Message-State: ALyK8tK/9sff5SxyrLMa1VI7dy2ltY8uEz765WWG/+nDQjnK0aV4XIQWvir607vdxD0PyOwuRxDbyXP3jy7CQvY4vbGaW6VM5tY8Dzbhpt0Skvr4OPp6ZXgna8LYu9CZ5kmtHToe7MxtQAkQsGzt0Vd3YumRwUk7HbJSOkS+jULvgeZVcdba86818ELRpoeymPZqUgIwSg== X-Received: by 10.176.4.3 with SMTP id 3mr17168044uav.127.1468850109963; Mon, 18 Jul 2016 06:55:09 -0700 (PDT) Received: from mail-vk0-f42.google.com (mail-vk0-f42.google.com. [209.85.213.42]) by smtp.gmail.com with ESMTPSA id b129sm3016528vka.14.2016.07.18.06.55.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jul 2016 06:55:08 -0700 (PDT) Received: by mail-vk0-f42.google.com with SMTP id j126so185464295vkg.3 for ; Mon, 18 Jul 2016 06:55:08 -0700 (PDT) X-Received: by 10.31.228.133 with SMTP id b127mr17254659vkh.90.1468850107962; Mon, 18 Jul 2016 06:55:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.148.199 with HTTP; Mon, 18 Jul 2016 06:55:07 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Mon, 18 Jul 2016 14:55:07 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: pgAdmin IV : Unittest modular patch To: Navnath Gadakh Cc: pgadmin-hackers , Kanchan Mohitey Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Thanks - applied with some tweaks and changes, most notably: - "--pkg all" is the default if no command line options are given. - Output now goes in regression/regression.log - Terminal output is limited to WARNINGS from the app server. - The runner script is now python regression/runtests.py On Mon, Jul 18, 2016 at 1:45 PM, Navnath Gadakh wrote: > Hi Dave, > > Please find the revised patch for unit tests of pgAdmin4 APIs. > > This patch includes- > > test_advance_config.json(for user it=E2=80=99s test_advance_config.json.i= n) for > advance test configuration for database/server(Priyanka was working on th= is) > > test_config.json(for user it=E2=80=99s test_config_json.in) for basic cre= dentials > data for database/server > > From now onward we can execute test cases node wise/package wise. I have > slightly modified the way of running the testsuite. We used the command l= ine > arguments(pkg) which denotes for which package testsuite going to run. > > > Run the testsuite for all packages by following command > > Python regression/testsuite.py --pkg all > > Here, =E2=80=98all=E2=80=99 means for all python > packages(i.e.browser,server_groups,server, > > databases etc. which are same names in project > directory structure) > > This will find the =E2=80=98tests=E2=80=99 directory in ea= ch package & > execute the test cases. > > > > Run the testsuite for single package by following command > > Python regression/testsuite.py --pkg browser (this execute the tests > in =E2=80=98browser=E2=80=99 package only) > > Python regression/testsuite.py --pkg > browser.server_groups.servers.databases (this execute the tests in > =E2=80=98databases=E2=80=99 package only) > > 4. Logger file. Which include the detailed output of the testsuite. > Testsuite also prints the test summary on the console. > > 5. Previously, we set the priority to each test case. In this patch > priority logic is removed as there is no need to set priority. > > 6. Resolution of AttributeError for attribute 'APP_ROOT'(Which is > mentioned by you in a previous email) > > > Note: You might get =E2=80=98AttributeError=E2=80=99 while running this p= atch on Python 3.4 > (I have raised this bug in RM(#1464)), But still you can run the testsuit= e. > It will run on Python 2.7 without error. > > > > On Fri, Jul 15, 2016 at 6:23 PM, Dave Page > wrote: >> >> Hi >> >> On Mon, Jul 11, 2016 at 2:16 PM, Navnath Gadakh >> wrote: >>> >>> Hi Dave, >>> PFA updated patch for modular API test cases. >>> >>> On Mon, Jul 11, 2016 at 5:11 PM, Dave Page >>> wrote: >>>> >>>> >>>> >>>> On Fri, Jul 8, 2016 at 2:30 PM, Navnath Gadakh >>>> wrote: >>>>> >>>>> >>>>> Hi Dave, >>>>> >>>>> PFA patch for modular API test cases. >>>>> >>>>> Kindly, review the same and let me know for any modification. >>>> >>>> >>>> Please re-create the patch so that it doesn't revert various changes >>>> made to config.py etc. over the last couple of weeks. >>> >>> >>> config.py file was not updated at my end, I have updated it in the >>> current patch. I have also added code related to advance test data >>> configuration which was created by Priyanka (Seprated the test data >>> configuration files). >>> >>>> >>>> What is the patch for? Is it fixing issues in Priyanka's last patch, or >>>> something else? >>>> This patch is for - >>>> 1. Now we can run testsuite node/module wise(like for browser only, for >>>> databases only) OR for all nodes/modules >>>> 2. I have modified the existing functionality for testsuite and all te= st >>>> case classes (Made all test cases independently runnable, removed the >>>> priority logic). >>> >>> >>> >>> For more details please refer the file 'regression/README'. >> >> >> When running all tests, I get: >> >> ... >> ... >> ' (HEAD, OPTIONS, GET) -> redirects.static>, >> ' (HEAD, OPTIONS, GET) -> backup.static>, >> ' (HEAD, POST, OPTIONS, GET) -> >> security.reset_password>, >> ' (HEAD, OPTIONS, GET) -> about.static>]) >> Traceback (most recent call last): >> File "regression/testsuite.py", line 151, in >> suite =3D get_suite(args, test_client) >> File "regression/testsuite.py", line 75, in get_suite >> TestsGeneratorRegistry.load_generators('pgadmin') >> File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/route.py", line 56, = in >> load_generators >> module =3D import_module(module_name) >> File >> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/= importlib/__init__.py", >> line 37, in import_module >> __import__(name) >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/dat= abases/tests/test_db_add.py", >> line 14, in >> from regression import test_utils as utils >> File "/Users/dpage/git/pgadmin4/web/regression/test_utils.py", line 23, >> in >> def get_ids(url=3Dconfig.APP_ROOT + '/regression/parent_id.pkl'): >> AttributeError: 'module' object has no attribute 'APP_ROOT' >> >> That's not overly surprising, as we don't have an APP_ROOT setting in the >> config (nor should we - it should be calculated dynamically). Please fix, >> and remember to test your patches against a clean copy of the git tree in >> the future! >> >> Thanks! >> >> -- >> Dave Page >> VP, Chief Architect, Tools & Installers >> EnterpriseDB: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake > > > > > -- > Thanks, > Navnath Gadakh > Software Engineer > EnterpriseDB Corporation > Mobile: +91 9975389878 > > --=20 Dave Page VP, Chief Architect, Tools & Installers EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company Blog: http://pgsnake.blogspot.com Twitter: @pgsnake --=20 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers