Get rid of phantomjs
phantomjs is broken beyond all recognition.
The "erratic hang" we face in phantom since the beginnings is open for 2 years now: https://github.com/ariya/phantomjs/issues/12750
Reading that issue would be amusing if we wouldn't have to deal with it. The only way to deal with that issue seems to be our "current" build on bamboo based on nginx hosting for the acceptance tests, which doesn't trigger the bug - or at least less often.
However, this solution isn't cool since the setup is hard coded to that very test that is run. Switching to anything else lets the "erratic" random issue pop up again. Furthermore, it is nearly impossible to have that running in a stable way on any environment that is not as cleanly nailed down as our build infrastructure. Contributors working on ac tests are giving up in this area because they're unable to run the tests in a stable way.
Funnily, there finally has been a patch in phantom master 4 weeks ago that might maybe - if god is nice to us - actually fix that issue. Since there are however no nightly-builds or whatsoever, I thought about compiling this piece of software on my own. But the official documentation for that based on "python build.py" is hopelessly outdated. The main bulid script doesn't exist in phantom master at all.
This is because the project currently (for more than half a year) is in a progress of switching to new dependencies. The build system however is not documented at all.
Here is how they answer on according questions:
"Quick question, given that build.py is removed now how do we build at the moment?"
"@samlinbris See if you can familiarize yourself with Qt and/or consult a Qt expert."
Next to that (in case we would manage to compile the Qt application without docu) it is currently impossible to statically link phantom with all its dependencies. So basically, phantom will end up to link to whatever might be available on given system, so we're again in dependency hell.
QT itself (phantom is based on that) seems to have abandoned (parts of?) webKit, so phantom is even forced to maintain that part of the infrastructure on their own.
phantom currently has less than 2000 commits on github with 1.500 open issues https://github.com/ariya/phantomjs
The progress of the project is slow and they don't even manage to release bug fixes, there wasn't even a single commit to their "stable" 2.1 branch since release in Jan 2016.
I'll not waste time in this area anymore.
All-in-all it seems webkit headless testing is a dead end. I also found nothing on the net yet that may suite our needs as alternative.
I propose to get rid of phantom and better rely on browsers that work.
We'll have to investigate on how to circumvent this issue in a sane way. I'm close to setting up xvfb on our testing infrastructure and run the stuff with firefox, maybe. Or we switch to some external solution.
Updated by Christian Kuhn over 4 years ago