Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox

From: Anthony Emengo <aemengo(at)pivotal(dot)io>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>, Joao De Almeida Pereira <jdealmeidapereira(at)pivotal(dot)io>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox
Date: 2018-05-04 21:15:49
Message-ID: CAG8BBZMbD=VAuS_ruUqzQhN6dM=-ZUChy11FF-f+uDRy8LawHA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hey Akshay,

Regarding your previous comment:

As I know time.sleep is not a good idea and I am new to feature test and in
> learning phase, can someone correct/suggest the way to fix those issues.

Although the feature tests already have some sleeps, it’s generally not a
best practice for browser automation. The better way is to use Waits that
the selenium API provides, mainly because they can accept a condition to
poll until fulfilled for rather than blocking the main thread of execution.
http://selenium-python.readthedocs.io/waits.html#explicit-waits. With
regards to the "fe_sendauth" password error . I’d probably would have done
it like so (I haven’t tested this):

WebDriverWait(self.driver, 10)\
.until(EC.text_to_be_present_in_element(
(By.NAME, 'password', server_config['db_password']))
)

In general, I ran the tests with the Firefox option and am seeing more
failures than I usually would with Chrome. I don’t feel particularly
strongly about the patch since our team mostly likely won’t be running it
over the course of our development. But I still couldn’t *run* the tests
without modify the code so that the server is up and running before the
browser automation starts. I think that this should be addressed.

Any thing in particular that I can help with regarding this, please let me
know! 😀

Anthony

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Joao De Almeida Pereira 2018-05-04 22:01:14 Re: [pgadmin4][patch] Initial patch to decouple from ACI Tree
Previous Message Dave Page 2018-05-04 15:57:42 Re: [pgAdmin4][RM#3238] Proper error handling when connection will be lost to server.