question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Where to find `testSummary` mentioned in Detox test life cycle docs

See original GitHub issue

Description

I am trying to enable video and screenshot artifacts for my Detox tests, and have bounced around the various pages and added detox.beforeEach and detox.afterEach as per this page.

I am not sure exactly how I am meant to get this testSummary value from within the init.ts of my tests, and the link provided 404s, and I can’t find the equivalent file in that directory.

Apologies if I have missed the page answering this, but have looked around everywhere and many links are broken or docs are missing. Would really appreciate learning how to get that testSummary from within the context on my beforeEach within my init file. Thanks!

Your environment

Detox version: 19.5.8 React Native version: 0.67 Node version: 16.1.0 Device model: n/a OS: macOS Monterey Test-runner (select one): jest

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
noomorphcommented, May 21, 2022

No worries, @RhyG , you can ask questions, as the docs might be out of sync on this topic. I am just not 100% sure what you are trying to achieve. Search for DetoxCoreListener in our codebase - you’ll see that we forward Jest environment events (including so-called beforeEach/afterEach) to those Detox lifecycle handlers.

0reactions
RhyGcommented, May 21, 2022

Yep I am that far and able to access it in the custom path builder, but from what I can tell from the docs that test summary is dynamically updated based on what you pass to detox.beforeEach() and detox.afterEach() so I was trying to find out how to get the current test information (test name, status etc) in order to generate that test summary and pass it to them. I am not currently using the Jasmine adapters I have seen in some docs so will try that.

I will just close this and keep searching the docs. Thanks a lot for the help. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test Lifecycle | Detox
This is documentation for Detox 19.x, which is no longer actively maintained. For up-to-date documentation, see the latest version (20.x).
Read more >
How to configure Detox lifecycle hooks in the latest version?
I run detox in version 17.13.2 with jest-circus as the test runner. My main problem is the app is not reset either after...
Read more >
Running E2E tests on EAS Build
In this guide, you will learn how to use one of the most popular libraries (Detox) to do that. This guide explains how...
Read more >
React Native End-to-end Testing and Automation with Detox
app" . Put the result in the build directory. Before firing up the test suite, make sure the device name you specified is ......
Read more >
NI-43-101-Technical-Report-Updated-Feasibility-Study- ...
Property Ownership and History . ... 2020 MPC-1 Optimization Detox Test Summary. ... 1.5 Mt/a from Year 3 (remaining mine life).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found