Gray box end-to-end testing and automation framework for mobile apps
MIT License
Bot releases are visible (Hide)
Published by rotemmiz over 4 years ago
DetoxNext is our reimplementation of Detox iOS. It is the biggest change we made in Detox's history. We are building Detox from the ground up.
Detox for iOS now uses an entirely new, custom built matcher, action and expectation infrastructure. This is the first step in our roadmap of removing Earl Grey as a dependency.
While the new system has been designed to be as compatible as possible with the existing system, some changes we made to existing APIs that may or may not require your attention.
Check out the migration guide for more details.
Published by noomorph over 4 years ago
Published by d4vidi over 4 years ago
Android:
launchApp({ userNotification })
.device.sendUserNotification()
API.Published by noomorph over 4 years ago
Published by noomorph over 4 years ago
Published by noomorph over 4 years ago
const { device, expect, /* ... so on ... */ } = require('detox');
Published by noomorph over 4 years ago
The new Detox integration with jest-circus
is going to replace the former ones with jest-jasmine2
and jest-circus
(aka detoxCircus.getEnv()
) as soon as it completes beta testing. The corresponding deprecation notices will be introduced prior to the next major release.
If you are starting a new project, then detox init -r jest
command will already equip you with the second generation of detox + jest-circus
integration. In existing projects, you will have to create a new e2e/environment.js
file and clear clutter from e2e/init.js
file (or even delete it) — see the updated Jest guide.
The major highlight of the new integration is #1661 — you will have ***Failure.png
screenshots right after an assertion fails: beforeAllFailure.png
, beforeEachFailure.png
, testFnFailure.png
, etc, depending on where the tests fail. This feature is available only if you use the new DetoxCircusEnvironment
.
For internal details, why #2009 is important, see the description of the pull request.
Published by noomorph over 4 years ago
Published by valentynberehovyi over 4 years ago
Detox can be configured via placing external configs in your project folder (#2050, by @noomorph). You can anytime extract your "detox"
section from package.json
into .detoxrc.json
or detox.config.json
file, to reduce clutter.
Added ability to configure DetoxInstruments’ sampling interval by instruments plugin configuration (#2037, by @valentynberehovyi)
"detox": {
"artifacts": {
"plugins": {
"instruments": {
"enabled": true,
+ "samplingInterval": 100
}
detox init -r mocha
creates e2e/.mocharc.json
instead of e2e/.mocharc
, because the latter is an undocumented option. (@avanderberg, thank you for bringing this to our attention)Published by d4vidi over 4 years ago
We've applied 2 important enhancements associated with the way Detox waits for app-idle (through Espresso):
As advised by Google, Android UI tests should system-wide disable all Android animations. In Detox, we've had that overlooked for a while, as it seemed that we could nonetheless figure out a way to have these types of animations synchronized. It appears Google have went to a lot of trouble in disallowing anyone from doing so.
Put in simple words, this evidently means Detox now applies this famous configuration commands-set automatically, when it comes to Emulators:
adb shell settings put global window_animation_scale 0
adb shell settings put global transition_animation_scale 0
adb shell settings put global animator_duration_scale 0
See #2077 for more details.
We've found by ourselves, alongside some feedback from the community, that on CI, Espresso's defaults for idle-wait can be too harsh. We therefore increased the defaults, but also allowed for custom configurations for those who wish to apply them. See #2079.
Published by noomorph over 4 years ago
var possibleError = new Error()
(ac5339a).To get rid of:
DeprecationWarning: Configuration via mocha.opts is DEPRECATED and will be removed from a future version of Mocha. Use RC files or package.json instead.
convert your mocha.opts
file to .mocharc.json
according to https://mochajs.org documentation and point runner-config
field in package.json
to that .mocharc.json
file:
{
"detox": {
"runner-config": "e2e/.mocharc.json"
}
}
Published by d4vidi over 4 years ago
Published by noomorph over 4 years ago
Note: this release does not contain the Detox-config related work (#2038, c82754546e7a0e3afc21edc77462533933c62b87), unlike what the commit log shows. Sorry about that, there was a release error.
Published by d4vidi over 4 years ago
Android:
adb install
, which appears to have certain issues (i.e. as described in #1857).--force-adb-install
, set to true
.Published by noomorph over 4 years ago
Published by noomorph over 4 years ago
Published by noomorph over 4 years ago
Published by d4vidi over 4 years ago
0.62
(current latest version is 0.62.2
) - #1996. That also includes:multiTap()
API -- each tap resulting in a long-tap (same as used to be for plain tap()
's).