Page MenuHomePhabricator

Investigate if WebdriverIO `sync: false` would be useful to us and document how to use it
Closed, DeclinedPublic


WebdriverIO configuration documentation says it is possible to run in async way.

// ===================
// Test Configurations
// ===================
// Define all options that are relevant for the WebdriverIO instance here
// Per default WebdriverIO commands getting executed in a synchronous way using
// the wdio-sync package. If you still want to run your tests in an async way
// using promises you can set the sync command to false.
sync: true,

That would complicate normal usage, but would be more JavaScript/Node.js way and it would simplify WebdriverIO/nodemw interactions.

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptDec 8 2017, 1:25 PM

Webdriver.IO used to be all async. That tended to confused people new to NodeJS.

With version 4, it is supposed to be synchronous by default. Setting sync: false being for people still having async tests so they don't have to rewrite all their tests.

One can still explicitly set a test as being async though. There are a few more details on

I would rather keep the default of running tests synchronously. If we want to make them faster we can find a way to increase concurrency. mediawiki/core has maxInstances, surely we could bump it up and wdio would split the tests per spec file.

It's not about speed, it's about code behaving like a normal Node.js/JavaScript code. Our target audience are people familiar with Node.js/JavaScript, not new to it.

zeljkofilipin lowered the priority of this task from Medium to Low.Feb 27 2018, 3:11 PM
zeljkofilipin renamed this task from WebdriverIO `sync: false` to Investigate if WebdriverIO `sync: false` would be useful to us and document how to use it.Mar 21 2018, 4:24 PM

From 3 ran tests asynchronously. 4 now runs them synchronously. The sync: false is a feature flag to ease the transition/upgrade process, the doc stating:

This way old and new tests can coexist and you can move your old test time after time to the new synchronous way of writing specs.