cypress icon indicating copy to clipboard operation
cypress copied to clipboard

CT Stack Traces

Open sync-by-unito[bot] opened this issue 2 years ago • 5 comments

Summary

In E2E we show a stack trace if there is an error in the test. It is (5) here:

!image-2022-02-09-20-16-55-107.png|thumbnail!

We want the same thing for CT. Right now, webpack dev server does not supply the correct source map - in fact, it doesn't have one at all. Also, even if it did, the seam between the dev-server and CT runner is not set up for stack traces.

For CT we go here https://github.com/cypress-io/cypress/blob/10.0-release/packages/driver/src/cypress/script_utils.ts#L49 as opposed to E2E which goes on and calls this https://github.com/cypress-io/cypress/blob/10.0-release/packages/driver/src/cypress/script_utils.ts#L36 which gets the source map.

Acceptance Criteria

  • Should return the source map from webpack dev server
  • Should extract and display it for component testing

Resources

Brian telling Lachlan about source maps for an hour or so:

Meeting Recording: https://cypress-io.zoom.us/rec/share/hiYJyb9yjp7W7UKPbow0gG3gum1Az7kXA7Yq8XtQGU0AcNUEpdSTo43JL-Zs59uJ.-2OgUXVt2mTAcgZp Access Passcode: message @lmiller1990

Open Pull Requests

Any PRs needed for review

┆Issue is synchronized with this Jira Task by Unito ┆Attachments: image-2022-02-09-20-16-55-107.png ┆author: Lachlan Miller ┆epic: CT Post Unification Release ┆friendlyId: UNIFY-1070 ┆priority: Low ┆sprint: Unification Release Backlog ┆taskType: Task

sync-by-unito[bot] avatar May 30 '22 06:05 sync-by-unito[bot]

➤ Brian Mann commented:

I paired with lachlan on this last night and explained everything to him, so he should be fully enabled on this

sync-by-unito[bot] avatar May 30 '22 06:05 sync-by-unito[bot]

➤ Lachlan Miller commented:

PR will be here eventually https://github.com/cypress-io/cypress/pull/20138/files ( https://github.com/cypress-io/cypress/pull/20138/files|smart-link )

I have some OOO coming, and expect to have to pick up some other things while working on this, so opening this PR early just to give visibility to my work.

sync-by-unito[bot] avatar May 30 '22 06:05 sync-by-unito[bot]

Hey team! Please add your planning poker estimate with ZenHub @astone123 @lmiller1990 @marktnoonan @ZachJW34 @mike-plummer @rockindahizzy @warrensplayer @amehta265

baus avatar Aug 24 '22 18:08 baus

Do source maps for the vite-dev-server work? Or is it just webpack-dev-server?

ZachJW34 avatar Aug 24 '22 20:08 ZachJW34

Not sure, but I'm guessing source maps are a pre-requisite for correct and accurate stack traces.

lmiller1990 avatar Aug 29 '22 02:08 lmiller1990

The code for this is done in cypress-io/cypress#23916, but has yet to be released. We'll update this issue and reference the changelog when it's released.

cypress-bot[bot] avatar Sep 26 '22 22:09 cypress-bot[bot]

Released in 10.9.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v10.9.0, please open a new issue.

cypress-bot[bot] avatar Sep 27 '22 16:09 cypress-bot[bot]