-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Rewrite synchronization and test-exec troubleshooting guides #4735
Conversation
df74dac
to
8be4648
Compare
8be4648
to
d4f8289
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great and very neccessary work, Amit! Thanks for putting effort into this. I liked very much your idea with tracking some long-standing TODO issues in the docs. This will help users to monitor the status of some requested features. Very good!
docs/articles/how-detox-works.md
Outdated
|
||
## How Detox Automatically Synchronizes With Your App | ||
|
||
One of the key features of Detox is its ability to automatically synchronize the test execution with your app. The most annoying aspect of end-to-end tests is flakiness—tests sometimes fail without anything changing. Flakiness happens because tests are nondeterministic. Every time a test is running, things take place in a slightly different order inside your app. | ||
One of the key features of Detox is its ability to automatically synchronize the test execution with your app. The most annoying aspect of end-to-end tests is flakiness—tests sometimes fail without anything changing. Flakiness happens because tests are nondeterministic. Every time a test is running, things take place in a slightly different order or execution-time inside your app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the key features of Detox is its ability to automatically synchronize the test execution with your app. The most annoying aspect of end-to-end tests is flakiness—tests sometimes fail without anything changing. Flakiness happens because tests are nondeterministic. Every time a test is running, things take place in a slightly different order or execution-time inside your app. | |
One of the key features of Detox is its ability to synchronize test execution with the app’s state, reducing instability caused by timing uncertainties. One of the biggest challenges in end-to-end testing is knowing exactly when the app is in a reliable state for assertions. Instability can arise due to asynchronous operations completing in different orders, depending on factors like system load, network conditions, and execution timing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've completely rephrased this section. Will push soon.
docs/articles/how-detox-works.md
Outdated
|
||
Detox tries to eliminate flakiness by automatically synchronizing your tests with the app. A test cannot continue to the next command until the app becomes idle. Detox monitors your app very closely in order to know when it’s idle. It tracks several asynchronous operations and waits until they complete. This includes: | ||
Detox tries to eliminate flakiness by automatically synchronizing your tests with the app. A test cannot continue to the next command until the app becomes idle. Detox monitors your app very closely in order to know when it’s idle. It tracks several asynchronous operations and waits until they complete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detox tries to eliminate flakiness by automatically synchronizing your tests with the app. A test cannot continue to the next command until the app becomes idle. Detox monitors your app very closely in order to know when it’s idle. It tracks several asynchronous operations and waits until they complete. | |
Detox reduces timing-related instability by dynamically synchronizing tests with the app’s actual execution state. Instead of relying on fixed delays or polling, Detox detects when the app is truly idle, ensuring actions and assertions happen at the right time. This synchronization not only improves reliability but can also **speed up test execution**, as it prevents unnecessary waiting. Detox tracks several key asynchronous operations to determine when the app is in a ready state. |
3c735ab
to
590b0fb
Compare
@noomorph please have an additional glance over the latest commit |
Description
In this pull request, I have rewritten the synchronization troubleshooting guide, in the sense of making it more practical, up to date (with knowledge+insights we've gathered) and thorough in terms of debugging and bug-fixing possibilities.
I've also extended the detox debugging guide such that it would explain how to utilize
--inspect-brk
using Webstorm.cc @Kerzman