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

feat: Debug page [IATR] #25488

Merged
merged 52 commits into from
Jan 31, 2023
Merged

feat: Debug page [IATR] #25488

merged 52 commits into from
Jan 31, 2023

Conversation

warrensplayer
Copy link
Contributor

@warrensplayer warrensplayer commented Jan 17, 2023

  • Closes N/A

This is a feature branch for all IATR M0 and M1.0 stories

User facing changelog

See cli/CHANGELOG.md

Additional details

See information and issues linked in the cli/CHANGELOG.md

Steps to test

Tested in all PRs merged to this feature branch.

How has the user experience changed?

See PRs for the commits to this feature branch for details.

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?

amehta265 and others added 28 commits November 22, 2022 09:45
* adding debug page

* Fixing sidebar e2e tests

* Adding more content to the Debug page and header updates

* Starting to wire up child components

* created util function for debug specs mapping and wrote tests

* update to debug page graphql extension parsing and tests for utility function

* Fix header test

* Type fixes

* Fix test

* Setting hash to same as feature branch

* New test for DebugContainer

* Test Ids needed for test

* Updates to fix type linting

* Update to cloud schema and types

* Fixing tests

* Minor test fix

* Updates from review comments

* Make use of existing computed value

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>

* Improve test

* Adding descriptions to cloud fields

* Encapsulate duration format in composable

* Making changes to align with latest cloud update

Co-authored-by: Ankit <ankit@cypress.io>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
Co-authored-by: Stokes Player <stokes.player@gmail.com>
Co-authored-by: elevatebart <bart@cypress.io>
Closes #24851
* feat: debug status badge

* remove unused code

* add debug icon

* fix e2e test

* address feedback
Co-authored-by: Rocky <25568640+rockindahizzy@users.noreply.github.com>
Co-authored-by: Stokes Player <stokes.player@gmail.com>
Closes #24849
Co-authored-by: Stokes Player <stokes@cypress.io>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Mark Noonan <mark@cypress.io>
Co-authored-by: Mike Plummer <mikep@cypress.io>
Closes #24855
@cypress
Copy link

cypress bot commented Jan 18, 2023

2 failed and 5 flaky tests on run #43629 ↗︎

2 197 23 0 Flakiness 5

Details:

Reverting CI workflows
Project: cypress Commit: c09086b813
Status: Failed Duration: 18:36 💡
Started: Jan 31, 2023 2:47 AM Ended: Jan 31, 2023 3:06 AM
Failed  cypress\e2e\migration.cy.ts • 1 failed test • launchpad-e2e

View Output Video

Test
global mode > migrates 2 projects in global mode Screenshot
Failed  cypress\e2e\project-setup.cy.ts • 1 failed test • launchpad-e2e

View Output Video

Test
Launchpad: Setup Project > Command for package managers > makes the right command for yarn Screenshot
Flakiness  cypress\e2e\migration.cy.ts • 1 flaky test • launchpad-e2e

View Output Video

Test
Full migration flow for each project > completes journey for migration-e2e-coffeescript Screenshot
Flakiness  cypress\e2e\scaffold-component-testing.cy.ts • 3 flaky tests • launchpad-e2e

View Output Video

Test
scaffolding component testing > vuecli4vue2 > scaffolds component testing for Vue CLI 4 w/ Vue 2 project Screenshot
scaffolding component testing > create-react-app > scaffolds component testing for Create React App v5 project Screenshot
scaffolding component testing > angular-cli-unconfigured > scaffolds component testing for Angular Screenshot
Flakiness  cypress\e2e\config-warning.cy.ts • 1 flaky test • launchpad-e2e

View Output Video

Test
component testing dependency warnings > warns against outdated @vue/cli dependency Screenshot

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@warrensplayer warrensplayer marked this pull request as ready for review January 30, 2023 20:47
@warrensplayer warrensplayer marked this pull request as draft January 30, 2023 20:47
@warrensplayer warrensplayer marked this pull request as ready for review January 30, 2023 21:30
@warrensplayer warrensplayer requested a review from a team January 30, 2023 21:39
const foundSpec = specs.find((spec) => spec.id === curr.specId)

if (!foundSpec) {
//TODO better handle error case
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any concerns with this todo? Is there a place that this would be handled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marktnoonan It would only happen if the Cloud gave back bad data. I did just test it and it would cause the page to hang on the loading skeleton. I will file a fast follow for this and update the comment.

cli/CHANGELOG.md Outdated

**Features:**

- Easily debug failed CI test runs from within the Cypress app with the new "Debug" page. For more details, see the [Debug documentation](https://on.cypress.io/debug-page).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO Easily debug failed CI test runs is misleading because we only show data if the run was recorded to the cloud. anyway to expand to indicate this is for recorded run?

Will there be a blog post associated with this feature release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emilyrohrbough How about...

Suggested change
- Easily debug failed CI test runs from within the Cypress app with the new "Debug" page. For more details, see the [Debug documentation](https://on.cypress.io/debug-page).
- Easily debug failed CI test runs from Cypress Cloud within the Cypress app with the new "Debug" page. For more details, see the [Debug documentation](https://on.cypress.io/debug-page).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@warrensplayer Sounds good 👍🏻

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like this

Suggested change
- Easily debug failed CI test runs from within the Cypress app with the new "Debug" page. For more details, see the [Debug documentation](https://on.cypress.io/debug-page).
- Easily debug failed CI test runs right from your local Cypress app with the new Debug page, powered by Cypress Cloud. For more details, see the [Debug documentation](https://on.cypress.io/debug-page).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with Peter's copy, removed the sub-bullets and referenced the PR instead of all the separate issues.

cli/CHANGELOG.md Outdated
Comment on lines 10 to 31
- Added Debug to the sidebar which includes a dynamic badge that shows a count of failed tests that need to be fixed. Addresses [#24441](https://github.com/cypress-io/cypress/issues/24441) and [#24852](https://github.com/cypress-io/cypress/issues/24852).
- Added the "Debug" page. Addresses
[#24442](https://github.com/cypress-io/cypress/issues/24442),
[#24443](https://github.com/cypress-io/cypress/issues/24443),
[#24444](https://github.com/cypress-io/cypress/issues/24444),
[#24851](https://github.com/cypress-io/cypress/issues/24851),
[#24852](https://github.com/cypress-io/cypress/issues/24852),
[#24847](https://github.com/cypress-io/cypress/issues/24847),
[#24854](https://github.com/cypress-io/cypress/issues/24854),
[#24848](https://github.com/cypress-io/cypress/issues/24848),
[#24853](https://github.com/cypress-io/cypress/issues/24853),
[#24849](https://github.com/cypress-io/cypress/issues/24849),
[#25352](https://github.com/cypress-io/cypress/issues/25352),
[#25339](https://github.com/cypress-io/cypress/issues/25339),
[#25319](https://github.com/cypress-io/cypress/issues/25319),
[#25418](https://github.com/cypress-io/cypress/issues/25418),
[#24440](https://github.com/cypress-io/cypress/issues/24440),
[#25487](https://github.com/cypress-io/cypress/issues/25487),
[#25543](https://github.com/cypress-io/cypress/issues/25543),
[#25570](https://github.com/cypress-io/cypress/issues/25570) and
[#25486](https://github.com/cypress-io/cypress/issues/25486).
- The test runner can be filtered to only run the tests that failed from the Cloud run being shown in the Debug page. Addresses [#24855](https://github.com/cypress-io/cypress/issues/24855).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't previously released, so these direct call out aren't needed IMO . We also don't need to link to each closed issue, just the Epic which tracked the initiative or we can reference this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update to remove those and reference the PR

@marktnoonan
Copy link
Contributor

I saw something a bit confusing, the pending run displayed 191 of 191 specs completed, but Cy Cloud showed 190 of 191 completed for that same run.

Screen Shot 2023-01-30 at 6 08 58 PM

As I was trying to get a side-by-side screenshot, the run completed on the Cloud window and the app UI correctly flipped to the "View Run" state that is expected:

Screen Shot 2023-01-30 at 6 13 32 PM

It seems like the local count was off by one and a spec was still pending in the cloud.

@warrensplayer
Copy link
Contributor Author

I saw something a bit confusing, the pending run displayed 191 of 191 specs completed, but Cy Cloud showed 190 of 191 completed for that same run.

It seems like the local count was off by one and a spec was still pending in the cloud.

There is a known issue with the spec counts in this case that will be addressed by: https://cypress-io.atlassian.net/browse/CYCLOUD-860

@lmiller1990
Copy link
Contributor

I tested it a bunch locally, seems great. I found one edge case. Repro

  1. have a repo with passing tests
  2. it says "Nice job, you tests are passing"
  3. push a commit with a failing test
  4. it updates real time (correct)
  5. it shows failed summary (correct)
  6. but the "Nice job" it still showing until I refresh

This does not really seem like a major blocker, can be fast follow (it doesn't make the feature broken or anything) but worth noting.

Screenshot:

image

@lmiller1990 lmiller1990 self-requested a review January 31, 2023 05:07
Copy link
Contributor

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed each PR before, so I jsut focused on testing - I left one edge case I found, but not really a major blocker. Glad to see this on the finish line!!

@warrensplayer
Copy link
Contributor Author

@lmiller1990 This is expected behavior at this time. The "Well done" message is referring to build #2 in your screenshot. The only way currently that build #3 would be shown as the current build on the page is to click the "View run" link, refresh the page (like you did), or be on a different page (through at least one polling cycle) and then come back to the Debug page.

A future update will change this behavior.

Copy link
Contributor

@mike-plummer mike-plummer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in my local testing, amazing work @warrensplayer ! 💯

@warrensplayer warrensplayer merged commit 660ff67 into develop Jan 31, 2023
@warrensplayer warrensplayer deleted the feature/IATR-M0 branch January 31, 2023 15:00
tgriesser added a commit that referenced this pull request Jan 31, 2023
* develop:
  chore: fix changlelog section parsing and reference right ENV (#25633)
  feat: Debug page [IATR] (#25488)
  fix(deps): update dependency underscore.string to v3.3.6 🌟 (#25574)
  chore: Use upstream cypress-testing-library again (#25548)
  fix: match alternate edge version string format (#25457)
  chore: update name for graphql batch operations (#25610)
  chore: clean up config for external contibutors (#25552)
  chore: fix childProcess.execSync encoding (#25625)
  chore: update next-version to handle using the next bump package.json… (#25599)
  chore: update packages/example deployment script and cleanup package/example (#25091)
  fix: allow version 9 of the babel-loader peer dependency (#25569)
  docs: remove cypress-example-todomvc-redux from release-process (#25613)
  chore: bump version and remove misleading changelog entry (#25612)
BlueWinds pushed a commit that referenced this pull request Feb 1, 2023
* fix: match alternate edge version string format (#25457)

* fix: match alternate edge version string format

* chore: add changelog entry

* Apply suggestions from code review

* Update cli/CHANGELOG.md

* Update cli/CHANGELOG.md

* chore: update changelog to release on Tuesday for 12.5

* [run ci]

---------

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>

* chore: Use upstream cypress-testing-library again (#25548)

* chore: Use upstream cypress-testing-library again

* Update cypress-example-kitchensink commit hash

* Revert "Update cypress-example-kitchensink commit hash"

This reverts commit 8de5d1f.

---------

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>

* fix(deps): update dependency underscore.string to v3.3.6 🌟 (#25574)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>

* feat: Debug page [IATR] (#25488)

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
Co-authored-by: Ankit <ankit@cypress.io>
Co-authored-by: Stokes Player <stokes.player@gmail.com>
Co-authored-by: elevatebart <bart@cypress.io>
Co-authored-by: Rocky <25568640+rockindahizzy@users.noreply.github.com>
Co-authored-by: Stokes Player <stokes@cypress.io>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Mark Noonan <mark@cypress.io>
Co-authored-by: Mike Plummer <mikep@cypress.io>
Co-authored-by: amehta265 <65267668+amehta265@users.noreply.github.com>
Co-authored-by: Adam Stone-Lord <adams@cypress.io>
Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>

* chore: fix changlelog section parsing and reference right ENV (#25633)

* test: skip flaky migration test (#25378)

* chore: Update README to add Cloud badges (#25645)

* perf: remove reporter logs for collapsed tests in run mode (#25632)

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>

* chore: 12.5.0 release (#25648)

* dependency: update dependency simple-git to v3.16.0 [security] (#25603)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zachary Williams <zachjw34@gmail.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>

* chore: renovate semantic types and percy ci updates (#25651)

---------

Co-authored-by: Steven Collins <steven@carboncollins.uk>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Stokes Player <stokes@cypress.io>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
Co-authored-by: Ankit <ankit@cypress.io>
Co-authored-by: Stokes Player <stokes.player@gmail.com>
Co-authored-by: elevatebart <bart@cypress.io>
Co-authored-by: Rocky <25568640+rockindahizzy@users.noreply.github.com>
Co-authored-by: Mark Noonan <mark@cypress.io>
Co-authored-by: Mike Plummer <mikep@cypress.io>
Co-authored-by: amehta265 <65267668+amehta265@users.noreply.github.com>
Co-authored-by: Adam Stone-Lord <adams@cypress.io>
Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Matt Schile <mschile@cypress.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants