As per this https://github.com/webdriverio/webdriverio/issues/1500, webdriverio test runner will load the config file for each spec file, which prevents us from persisting/sharing data/status across these specs (and sessions).
I'm wondering how it could be worked around. I guess it should be do-able, because the test-runner itself knows which spec it's going to run every time it loads the config file although the config file actually contains all the spec files as below
specs: [
'test/spec/**'
],
Just don't know how.
The bottom line is that keep the data in a temp file on the disk. However, this is quite ugly.