asciidoctor.js icon indicating copy to clipboard operation
asciidoctor.js copied to clipboard

Use Firefox Headless in the benchmark

Open ggrossetie opened this issue 7 years ago • 9 comments

https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-the-Firefox-addon-in-headless-mode https://slimerjs.org/

ggrossetie avatar Feb 04 '18 22:02 ggrossetie

:+1:

mojavelinux avatar Feb 04 '18 23:02 mojavelinux

I think it's a bit too soon:

  • The version 1.0.0-beta.1 is not yet published on beta channel so basically you have to download an archive from https://download.slimerjs.org/releases/1.0.0-beta.1/
  • The documentation is hard to find and limited: https://docs.slimerjs.org/master/release-notes-1.0.html
  • The latest version 1.0.0-beta.1 does not work with Firefox 58: https://github.com/laurentj/slimerjs/issues/675

I will wait for the 1.0.0 "final" version.

ggrossetie avatar Feb 10 '18 16:02 ggrossetie

Hm, can't you use it with karma-firefox-launcher directly?

browsers: ['ChromeHeadlessNoSandbox', 'firefox'],

Karma would launch the tests with both browsers in parallel.

thom4parisot avatar Feb 10 '18 17:02 thom4parisot

I didn't try because I didn't know if we could report back how much time each run took ?

But we should definitely use Karma to run the tests suite against Chrome and Firefox.

ggrossetie avatar Feb 10 '18 17:02 ggrossetie

To be more specific I was looking for something similar to https://github.com/GoogleChrome/puppeteer but for Firefox

ggrossetie avatar Feb 10 '18 17:02 ggrossetie

I guess you could separate the runs with the build matrix (one for Chrome, one for Firefox).

language: node_js
matrix:
  include:
  - node_js: "stable"
    env: BROWSER=ChromeHeadlessNoSandbox
  - node_js: "stable"
    env: BROWSER=firefox
script: npm test -- --browser=$BROWSER

Alternatively, you can also run two separate commands within the same build (Travis lists how long it takes on the right handside of the build logs)

image

thom4parisot avatar Feb 10 '18 18:02 thom4parisot

@Mogztter , @mojavelinux , @oncletom , @ Hello friend, I have the same problem but with ubuntu 16.04 I am a newbie in this and I have only been able to install firefox as well. apt-get install firefox but in this way install version 58.02 and according to your comment it seems that it has no compatibility so I am trying to install firefox 57 on my vps ubuntu 16.04 without graphical environment but not achieved and could share the commands to install previous versions of firefox in linux ? Thank you ;)

xaiborweb avatar Feb 25 '18 23:02 xaiborweb

https://twitter.com/ChromiumDev/status/1070790759937269761?s=19

📣Announcing Puppeteer for Firefox 🤹🏻‍♂️💕🦊 An experimental project for controlling Firefox using Puppeteer's API. Still missing features but give it a try and let us know what you think! npm i puppeteer-firefox Learn more: https://t.co/WAxKExfCiu https://t.co/kTqw5HRA4h

ggrossetie avatar Dec 06 '18 23:12 ggrossetie

Even better (from the Puppeteer team): https://github.com/microsoft/playwright

We are the same team that built Puppeteer. Puppeteer proved that there is a lot of interest in the new generation of ever-green, capable and reliable automation drivers. With Playwright, we'd like to take it one step further and offer the same functionality for all the popular rendering engines. We'd like to see Playwright vendor-neutral and shared governed.

ggrossetie avatar Jan 23 '20 12:01 ggrossetie