Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix: revert log level debug to verbose due to Mocha incompatibility #859

Merged
merged 2 commits into from
Jul 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion detox/local-cli/detox-run-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ program
'8099'
)
.option('-l, --loglevel [value]',
'Log level: fatal, error, warn, info, debug, trace', 'info')
'Log level: fatal, error, warn, info, verbose, trace', 'info')
.option(
'--no-color',
'Disable colorful logs',
Expand Down
2 changes: 1 addition & 1 deletion detox/local-cli/detox-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ program
.option('-s, --specs [relativePath]',
`Root of test folder`)
.option('-l, --loglevel [value]',
'Log level: fatal, error, warn, info, debug, trace')
'Log level: fatal, error, warn, info, verbose, trace')
.option('--no-color',
'Disable colors in log output')
.option('-c, --configuration [device configuration]',
Expand Down
1 change: 0 additions & 1 deletion detox/src/utils/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ function adaptOlderLogLevelName(level) {

function isLogLevelNameDeprecated(level) {
switch (level) {
case 'verbose':
case 'silly':
case 'wss':
return true;
Expand Down
4 changes: 2 additions & 2 deletions detox/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"test": ":",
"packager": "react-native start",
"detox-server": "detox run-server",
"e2e:ios": "detox test --configuration ios.sim.release --debug-synchronization --take-screenshots all --record-videos none --record-logs all --loglevel debug",
"e2e:ios": "detox test --configuration ios.sim.release --debug-synchronization --take-screenshots all --record-videos none --record-logs all --loglevel verbose",
"e2e:ios-multi": "npm run e2e:ios -- -w 2",
"e2e:android": "detox test --configuration android.emu.release --take-screenshots all --record-videos none --record-logs all --loglevel debug",
"e2e:android": "detox test --configuration android.emu.release --take-screenshots all --record-videos none --record-logs all --loglevel verbose",
"build:ios": "detox build --configuration ios.sim.release",
"build:android": "detox build --configuration android.emu.release",
"verify-artifacts:ios": "jest ./scripts/verify_artifacts_are_not_missing.ios.test.js",
Expand Down
14 changes: 7 additions & 7 deletions docs/APIRef.DetoxCLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Initiating your test suite
| --- | --- |
| -h, --help | output usage information |
| -o, --runner-config \<config\> | Test runner config file, defaults to 'e2e/mocha.opts' for mocha and 'e2e/config.json' for jest |
| -l, --loglevel [value] | Log level: fatal, error, warn, info, debug, trace |
| -l, --loglevel [value] | Log level: fatal, error, warn, info, verbose, trace |
| --no-color | Disable colors in log output |
| -c, -configuration \<device config\> | Select a device configuration from your defined configurations,if not supplied, and there's only one configuration, detox will default to it |
| -r, --reuse | Reuse existing installed app (do not delete and re-tall) for a faster run. |
Expand All @@ -60,7 +60,7 @@ Initiating your test suite
| -H, --headless | [Android Only] Launch Emulator in headless mode. Useful when running on CI. |
| -w, --workers | [iOS Only] Specifies number of workers the test runner should spawn, requires a test runner with parallel execution support (Detox CLI currently supports Jest) |

> NOTE: such log levels as `verbose`, `silly`, `wss` are deprecated since detox@8.1.0 and will be removed in 9.0.0.
> NOTE: such log levels as `silly` and `wss` are deprecated since detox@8.1.0 and will be removed in 9.0.0.

### build
Run a command defined in 'configuration.build'
Expand All @@ -79,12 +79,12 @@ Start a standalone Detox server

`detox run-server [options]`

| Option | Description |
| Option | Description |
| --- | --- |
| -p, --port [port] | Port number (default: 8099) |
| -l, --loglevel [value] | Log level: fatal, error, warn, info, debug, trace |
| --no-color | Disable colorful logs |
| -h, --help | output usage information |
| -p, --port [port] | Port number (default: 8099) |
| -l, --loglevel [value] | Log level: fatal, error, warn, info, verbose, trace |
| --no-color | Disable colorful logs |
| -h, --help | output usage information |

### init

Expand Down
2 changes: 1 addition & 1 deletion docs/Troubleshooting.Flakiness.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Assume you have a suite of 100 tests and each test is flaky in 0.5% of execution

It's important to identify the various sources of flakiness in Detox tests.

* Control of the device / simulator - in order to run your tests, Detox must communicate with a simulator and instruct it to install the app, restart it, etc. Simulators don't always behave and controlling them might occasionally fail.<br> Detox's underlying simulator control is [`AppleSimulatorUtils`](https://github.com/wix/AppleSimulatorUtils), it is a tool that supports both basic and advanced simulator and device interaction options, it uses some core simulator features which are not always stable and may need time to "warm up" (booting, shutting down, etc.). Detox is set to have a few retries on any of these actions before failing. It will also print all the `exec` commands when using `debug` log level, and with `trace` level it will print everything.
* Control of the device / simulator - in order to run your tests, Detox must communicate with a simulator and instruct it to install the app, restart it, etc. Simulators don't always behave and controlling them might occasionally fail.<br> Detox's underlying simulator control is [`AppleSimulatorUtils`](https://github.com/wix/AppleSimulatorUtils), it is a tool that supports both basic and advanced simulator and device interaction options, it uses some core simulator features which are not always stable and may need time to "warm up" (booting, shutting down, etc.). Detox is set to have a few retries on any of these actions before failing. It will also print all the `exec` commands when using `verbose` log level, and with `trace` level it will print everything.

* Asynchronous operations inside your app - every time an E2E test runs, operations might take place in a different order inside your app. This makes E2E tests nondeterministic. Consider an HTTP request made to a server, this request may take a variable time to complete due to external concerns like network congestion and server load.<br>Detox takes this into account by monitoring all asynchronous operations that take place in your app from the inside. Detox knows which network requests are currently in-flight. Detox knows how busy the React Native bridge is. Tests are automatically synchronized to the app and only move forward when the app is idle.

Expand Down