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

Detox Instruments Integration (Phase 1) #1165

Merged
merged 50 commits into from
Apr 18, 2019
Merged

Conversation

LeoNatan
Copy link
Contributor

@LeoNatan LeoNatan commented Feb 21, 2019

This PR aims to add initial integration between Detox and Detox Instruments.

Detox will load or use the already loaded Profiler framework and call its APIs to record performance metrics for each test. Each recording will be collected by the artifacts manager.

Discussion/Tasks

  • Determine optimal way of collecting performance metrics (one recording for entire suite vs one recording per describe vs one recording per test)
  • Artifacts manager should collect the recordings
  • Finalize the actual performance collection config
  • Prerequisite: complete and merge yargs PR Switch CLI to yargs #1109
  • Add Detox argument to enable recording
  • Handle app termination from Detox API—need to stop recording before using xcrun simctl terminate.
  • Handle crashing or otherwise app exist—need to stop recording
  • JS coverage
  • Change Detox server to notify testee in case tester is disconnected (to support ⌃+C)
  • Handle cases when Detox Instruments is not installed on user's system

@LeoNatan
Copy link
Contributor Author

@noomorph Could you please take the "Artifacts manager should collect the recordings" and "Change Detox server to notify testee in case tester is disconnected" tasks? Thanks

@LeoNatan
Copy link
Contributor Author

LeoNatan commented Feb 21, 2019

For now, every test has its own recording file. I first sanitize the fullName string for file name (:/\?%*|"<> characters turn into _). To that the .dtxrec extension is added, and these files are saved under the app's Documents folder.

rotemmiz and others added 9 commits March 12, 2019 14:28
event structure:
```
{
  "title": "should have welcome screen",  //test name
  "fullName": "Sanity should have welcome screen", //suite + test name
  "status": "passed" // running/passed/failed
}
```
If the user has already loaded the Profiler framework, use that
If not, attempt loading from default path
Stop recording when tests end
…hardcoded profiler path from /Applications

Delay loading to a fraction later to allow logging facility to load.
@noomorph noomorph force-pushed the DetoxInstrumentsIntegration branch from 560bb51 to 095a652 Compare March 12, 2019 12:28
@noomorph noomorph marked this pull request as ready for review April 2, 2019 05:23
@noomorph noomorph merged commit 6c73108 into master Apr 18, 2019
@noomorph noomorph deleted the DetoxInstrumentsIntegration branch April 18, 2019 11:29
@lock lock bot locked as resolved and limited conversation to collaborators Apr 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants