Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Improved DevTools release/regression testing #1209

Closed
1 of 2 tasks
bvaughn opened this issue Oct 31, 2018 · 1 comment
Closed
1 of 2 tasks

Improved DevTools release/regression testing #1209

bvaughn opened this issue Oct 31, 2018 · 1 comment
Assignees

Comments

@bvaughn
Copy link
Contributor

bvaughn commented Oct 31, 2018

Regression testing is an important part of updating and releasing DevTools, but it has gotten increasingly difficult as we've added advanced features to React (e.g. async, suspense, hooks). Even some of the recent tag constant changes (e.g. #1103, #1190) complicate this testing process, as they introduce potentially significant differences between minor releases of React that require explicit testing.

  • Improved automated tests

Despite its large feature set, DevTools currently has only 4 test suites containing a total of 16 tests. We should invest some more effort here. Specifically, I'd like to see us add tests that protect against regressions. I think we could use a similar approach as with reactjs/react-lifecycles-compat, where we run tests against multiple versions of React.

Specifically, I think there might be some low-effort value to be gained by writing a simple test for each version of React that feeds DevTools an element tree and then verifyies the expected return values (e.g. name, type, props, state).

Our "plain test shell" example app can be great for testing a change to the DevTools UI, but it isn't all that helpful in terms of regression testing. The fact that it requires compilation, and that the compiled source code is committed to the Git repo, is also irritating.

I think we could create a couple of similar test harnesses, perhaps one for each React version 14, 15, and 16, don't require compilation. Instead these test harnesses could load a UMD version of react and react-dom (maybe selectable via a drop-down that controls a URL parameter). Each test harness could progressively enhance its features based on the semver minor tag (e.g. 16.6.x+ would have a test for .memo).

This way we'd have a centralized place to sanity check changes prior to releasing a new version.

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 19, 2019

React DevTools has been rewritten and recently launched a new version 4 UI. The source code for this rewrite was done in a separate repository and now lives in the main React repo (github.com/facebook/react).

Because version 4 was a total rewrite, and all issues in this repository are related to the old version 3 of the extension, I am closing all issues in this repository. If you can still reproduce this issue, or believe this feature request is still relevant, please open a new issue in the React repo: https://github.com/facebook/react/issues/new?labels=Component:%20Developer%20Tools

@bvaughn bvaughn closed this as completed Aug 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant