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

Interactive Detox (REPL) #4239

Open
noomorph opened this issue Oct 22, 2023 · 5 comments
Open

Interactive Detox (REPL) #4239

noomorph opened this issue Oct 22, 2023 · 5 comments

Comments

@noomorph
Copy link
Collaborator

Describe your idea

Add a special mode of Detox where a single test is executed in a way that utilizes the abilities of an interactive shell.

@d4vidi says:

I envision writing a test step-by-step -- with the tested app fully running on a device, with each line written on the fly with the help of the shell, suggesting Detox API's completion as you type JavaScript code in.
It can also allow executing the line (~== invocation), inspecting the result (assertion success/failure), and then rerunning it with changes based on the result.

Given the shell could sport some additional helper functions - the most fundamental of which is to get a dump of the view hierarchy on demand (!), this could make a pretty helpful tool, well-reducing test-writing / maintenance friction.

@noomorph
Copy link
Collaborator Author

noomorph commented Oct 22, 2023

@noomorph says:

Hm, WebdriverIO has something similar: https://webdriver.io/docs/repl/

Demo

Also this may come in handy:
https://www.npmjs.com/search?ranking=maintenance&q=keywords%3Arepl

@d4vidi
Copy link
Collaborator

d4vidi commented Oct 22, 2023

Great write-up. Thanks @noomorph 😍

@d4vidi
Copy link
Collaborator

d4vidi commented Oct 22, 2023

I am contemplating the idea of taking it a step further and enabling the taking into account of imported modules, for example - drivers, test ID's, test kits. That would provide a very holistic solution, but not sure whether feasible.

In order to support that, it would make more sense to introduce this feature as an IDE plugin that somehow utilizes test debugging, rather than an interactive shell.

@d4vidi d4vidi changed the title Detox REPL Interactive Detox (REPL) Nov 26, 2023
@noomorph
Copy link
Collaborator Author

noomorph commented Dec 5, 2023

Another closely related idea is to enter awaiting mode (Phase 1) and REPL (Phase 2) on test failure in local dev environment.

This time saver would help the test writers to interact with the elements and see what's wrong while staying on the last app screen – no need to restart the flow manually.

Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this repository, read this discussion.

@stale stale bot added the 🏚 stale label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants