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

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

Merged
merged 11 commits into from
Jan 31, 2023

Conversation

mschile
Copy link
Contributor

@mschile mschile commented Jan 30, 2023

Additional details

In order to reduce memory consumption, I am clearing the reporter logs for collapsed tests in run mode.

Steps to test

Run a spec in headed run mode and verify a successful test has its reporter logs cleared and a failed test has its reporter logs retained.

How has the user experience changed?

Before (logs retained):
Screen Shot 2023-01-30 at 2 13 34 PM

After (logs cleared):
Screen Shot 2023-01-30 at 2 15 27 PM


Running the following spec produced the following results:

describe('memory spec', { browser: { family: 'chromium' } }, () => {
  const text = 'x'.repeat(100000)

  for (let index = 0; index < 50; index++) {
    it(`test ${index + 1} passes`, () => {
      cy.visit('http://localhost:3500/memory')

      for (let index = 0; index < 100; index++) {
        cy.get(`#p${index}`).should('have.text', text)
      }
    })
  }
})
<html>
  <body></body>
  <script>
    for (let i = 0; i < 100; i++) {
      const el = document.createElement('p')
      el.id = 'p' + i
      el.innerHTML = 'x'.repeat(100000)
            
      document.body.appendChild(el)
    }
  </script>
</html>  

Before:
Screen Shot 2023-01-30 at 2 07 59 PM

After:
Screen Shot 2023-01-30 at 2 08 27 PM

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)
  • [n/a] Has a PR for user-facing changes been opened in cypress-documentation?
  • [n/a] Have API changes been updated in the type definitions?

@mjhenkes mjhenkes self-requested a review January 30, 2023 21:37
@AtofStryker AtofStryker self-requested a review January 30, 2023 21:37
@emilyrohrbough
Copy link
Member

emilyrohrbough commented Jan 30, 2023

@mschile will this retrain the logs of failed tests? wondering if users can still debug when running

cypress run --spec record.cy.js --headed --no-exit

EDIT: NEVER MIND. I only looked at the pictures and didn't read the full text. You say the logs for the failed tests are retrained.

@mschile
Copy link
Contributor Author

mschile commented Jan 30, 2023

@mschile will this retrain the logs of failed tests? wondering if users can still debug when running

Yes, when running in headed run mode, the logs will be retained for the failed tests but would be cleared for the successful tests.

cli/CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@emilyrohrbough emilyrohrbough 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 with changelog update!

@cypress
Copy link

cypress bot commented Jan 30, 2023

6 flaky tests on run #43641 ↗︎

0 4486 902 0 Flakiness 6

Details:

removing isActuallyInteractive
Project: cypress Commit: f952901b64
Status: Passed Duration: 15:42 💡
Started: Jan 31, 2023 3:58 PM Ended: Jan 31, 2023 4:14 PM
Flakiness  commands/net_stubbing.cy.ts • 3 flaky tests • 5x-driver-webkit

View Output Video

Test
network stubbing > intercepting request > can delay and throttle a StaticResponse
... > with `times` > only uses each handler N times
... > stops waiting when an xhr request is canceled
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-webkit

View Output Video

Test
... > correctly returns currentRetry
... > correctly returns currentRetry
... > correctly returns currentRetry

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

@mschile mschile changed the title fix: remove reporter logs for collapsed tests in run mode perf: remove reporter logs for collapsed tests in run mode Jan 30, 2023
cli/CHANGELOG.md Outdated Show resolved Hide resolved
@emilyrohrbough emilyrohrbough merged commit facfd0d into develop Jan 31, 2023
@emilyrohrbough emilyrohrbough deleted the mschile/clear_logs branch January 31, 2023 16:33
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.

Release command log items in run mode
4 participants