Functional HTTP testing

Lukas Fleischer lfleischer at
Sun Mar 15 12:33:27 UTC 2020

On Sat, 14 Mar 2020 at 10:58:54, Frédéric Mangano-Tarumi wrote:
> With the current plans of porting the PHP codebase to Python, we should
> consider setting up a suite of functional tests to squash most bugs
> introduced by the rewrite.
> [...]
> HTTP testing being a kind of language-agnostic blackbox testing, the
> tests would also resist any future rewrite or major refactoring without
> requiring maintenance.
> [...]
> I think it\u2019s safe to start with Requests, and consider Mechanize later
> if need be, or even Selenium. Mechanize and Selenium kind of overlap
> with each other, so we should pick only one of the two, but Requests is
> well-known and should never be unwelcome.

Thanks for all the work. I agree that functional tests are important and
your suggestions sound good to me.

We should also roughly define what we expect from a rewrite. We probably
don't want to require all HTML to be exactly the same on a byte level.
Do we want the DOM representation to remain exactly the same or are we
fine with some small changes? We don't need to be super strict with this
but having some guidelines that are only broken in special cases would
be helpful.

> If it were only me, I\u2019d pick Perl for its shell-like features and regex
> support that make it a great tool for writing tests in my opinion.
> However, not that many developers are familiar with Perl nowadays.

I'd prefer Python, even if only for consistency with the main code base.
I don't feel strongly about it but introducing another programming
language has its downsides.

More information about the aur-dev mailing list