Tutorial: 8 - Understanding Test and Runner Files

8 - Understanding Test and Runner Files

Test and runner files are the core of this testing platform.


Basic Principles

The testing system is Promise-based and synchronous. If you return a Promise, the test runner will wait for that Promise to resolve or reject before moving on to the next test.

We're using WebdriverIO in sync mode.


Test Files

Each test file should describe a journey.

See this doc for more detail.


Runner Files

Because proxies can only be add in an onPrepare hook, and we want to generate a proxy 'run' (essentially a bucket of logs, grouped into steps, or 'actions'), we can't use WebdriverIO's built-in multi-file-running capabilities without capturing all the network traffic for all the tests in a single, confused mess.

The runner file lets us run multiple tests with a single command (and pre-configured concurrency settings), by specifying a list of files and browsers to run (all combinations will be run).

See this doc for more detail.