Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#7262 closed defect (fixed)

npm test fail with more that one test for browser in adblockpluscore

Reported by: hfiguiere Assignee: hfiguiere
Priority: Unknown Milestone:
Module: Automation Keywords:
Cc: tlucas, sebastian Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29999578

Description (last modified by hfiguiere)

Environment

If there is more than one test file in test/browser, npm test fails.
This is only with WebDriver, either Chrome or Firefox. The Chrome remote interface is exempt.

How to reproduce

  1. Add a new test file in test/browser
  2. Run npm test with the default

Observed behaviour

Chrome test with the remote interface will pass.

Test will timeout:

Browser unit test failed: ScriptTimeoutError: Timed out
npm ERR! Test failed.  See above for more details.

Expected behaviour

All test pass.

Note

If run with Chrome webdriver, the Chrome test timeout as well.

Change History (11)

comment:1 Changed 10 months ago by hfiguiere

  • Cc tristan added; t.lucas@… removed

comment:2 Changed 10 months ago by hfiguiere

  • Cc tlucas added; tristan removed

comment:3 Changed 10 months ago by hfiguiere

  • Description modified (diff)

comment:4 Changed 10 months ago by sebastian

My guess would be that this is because you don't properly shutdown the first browser instance (by calling quit()) after calling runScript() in chromium_process.js. Even better you would reuse the same web driver instance for running multiple test scripts.

Last edited 10 months ago by sebastian (previous) (diff)

comment:5 Changed 10 months ago by hfiguiere

  • Owner set to hfiguiere
  • Review URL(s) modified (diff)

comment:6 Changed 10 months ago by hfiguiere

  • Status changed from new to reviewing

comment:7 Changed 10 months ago by hfiguiere

It was simpler than that.

comment:8 Changed 10 months ago by jsonesen

Oh hey, I recon this fixes #7263 as well, or at least fixes part of the issue since I still get timeouts even when I don't receive the protocol command error from webdriver

Last edited 10 months ago by jsonesen (previous) (diff)

comment:9 Changed 10 months ago by abpbot

A commit referencing this issue has landed:
Issue 7262 - Allow more than one test

comment:10 Changed 10 months ago by hfiguiere

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:11 Changed 10 months ago by abpbot

A commit referencing this issue has landed:
Issue 7262 - Allow more than one test

Note: See TracTickets for help on using tickets.