Meteor-Community-Packages / meteor-browser-tests

A helper package for Meteor test driver packages. Runs client tests in a headless browser.
MIT License
12 stars 21 forks source link

Set chromedriver --log-level #17

Closed fishsaidno closed 6 years ago

fishsaidno commented 6 years ago

Hi,

It would be nice be able to set the chromium --log-level switch when running tests. To prevent errors such as [ERROR] Failed to load resource: net::ERR_NAME_NOT_RESOLVED from cluttering the test output.

INFO = 0 WARNING = 1 LOG_ERROR = 2 LOG_FATAL = 3

Whether or not the drivers for other browsers expose a similar option? I'm not sure.

Any thoughts on this?

aldeed commented 6 years ago

If you or anyone wants to try to implement this, see here: https://github.com/meteortesting/meteor-browser-tests/blob/master/browser/chromedriver.js#L42-L46

You would need to experiment and see which log levels would still allow the output from the test runner (e.g. mocha) to pass through. If it still works when setting some other levels, then you'd have to add some env variable for the desired level and just check it in that file.

SimonSimCity commented 6 years ago

You can now set this yourself by using the shell-variable TEST_CHROME_ARGS introduced in https://github.com/meteortesting/meteor-browser-tests/issues/18.

Please reopen if you're not satisfied with this solution.