puppeteer/utils
Andrey Lushnikov f753ec6b04
chore(testrunner): distinguish between TERMINATED and CRASHED (#4821)
`testRunner.run()` might have 4 different outcomes:
- `ok` - all non-skipped tests passed
- `failed` - some tests failed or timed out
- `terminated` - process received SIGHUP/SIGINT while testrunner was running tests. This happens on CI's under certain circumstances, e.g. when
  VM is getting re-scheduled.
- `crashed` - testrunner terminated test execution due to either `UnhandledPromiseRejection` or
  some of the hooks (`beforeEach/afterEach/beforeAll/afterAll`) failures.

As an implication, there are 2 new test results: `terminated` and `crashed`.
All possible test results are:
- `ok` - test worked just fine
- `skipped` - test was skipped with `xit`
- `timedout` - test timed out
- `failed` - test threw an exception while running
- `terminated` - testrunner got terminated while running this test
- `crashed` - some `beforeEach` / `afterEach` hook corresponding to this
test timed out of threw an exception.

This patch changes a few parts of the testrunner API:
- `testRunner.run()` now returns an object `{result: string,
terminationError?: Error, terminationMessage?: string}`
- the same object is dispatched via `testRunner.on('finished')` event
- `testRunner.on('terminated')` got removed
- tests now might have `crashed` and `terminated` results
- `testRunner.on('teststarted')` dispatched before running all related
`beforeEach` hooks, and `testRunner.on('testfinished')` dispatched after
running all related `afterEach` hooks.
2019-08-08 15:15:09 -07:00
..
browser docs(troubleshooting): fix bundle directions (#3808) 2019-01-18 17:33:34 -08:00
doclint feat(puppeteer): introduce puppeteer.errors and puppeteer.devices (#4312) 2019-04-19 15:33:06 -07:00
flakiness-dashboard chore(flakiness): update flakiness format (#4808) 2019-08-06 15:32:55 -07:00
node6-transform chore: introduce initial version of flakiness dashboard (#4781) 2019-07-31 22:23:50 -07:00
protocol-types-generator test: setup sandbox on linux (#3530) 2018-11-12 23:26:16 -08:00
testrunner chore(testrunner): distinguish between TERMINATED and CRASHED (#4821) 2019-08-08 15:15:09 -07:00
testserver fix(tests): Get TLS version from Node instead of hardcoding it (#4700) 2019-07-14 18:33:31 -07:00
apply_next_version.js chore: another attempt to fix pptr@next (#3210) 2018-09-06 21:38:17 +01:00
bisect.js chore(bisect): properly output bisect ranges + output styling (#3523) 2018-11-08 19:17:56 -08:00
check_availability.js chore: improve //utils/check_availability.js (#4770) 2019-07-29 14:29:50 -07:00
ESTreeWalker.js feat(launcher): add experimental "transport" option to pptr.connect (#3265) 2018-09-20 11:55:23 -07:00
fetch_devices.js fix(devicedescriptors): fix UA in DeviceDescriptors (#2741) 2018-06-14 13:55:09 -07:00
prepare_puppeteer_core.js feat: prepare for publishing puppeteer-core (#3047) 2018-08-08 15:14:23 -07:00