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

Use Replay for smoke tests #10664

Merged
merged 2 commits into from
May 30, 2024
Merged

Use Replay for smoke tests #10664

merged 2 commits into from
May 30, 2024

Conversation

callingmedic911
Copy link
Member

@callingmedic911 callingmedic911 commented May 21, 2024

This PR set up Replay for smoke tests. Dom integrated Replay in the past to debug hard-to-repro problems. There have been a lot of updates with Replay (Chromium instead of Firefox as base, new test suite dashboard, new CLI). Eventually, I want to set up Playwright (with Replay) for framework users but first for framework authors (you guys).

How do I access the Replay dashboard?

Dashboard home for RedwoodJS

How does the dashboard look?

Screenshot 2024-05-23 at 4 43 59 PM

Can you show me how you debug with Replay?

https://www.loom.com/share/6553abcaaaac489f999547cb76773134 (very rushed, tiny demo). Docs is also a good place to start: https://docs.replay.io/ (We rewrote that recently)

Other things to note:

  • Replay is not currently available for Windows. Those tests will run directly on Chromium.
  • Progressive SSR is failing only on the Replay browser with headless mode. I have filed an issue internally, I'll do a follow-up once that is fixed. SSR smoke tests are running on Chromium directly.

@callingmedic911 callingmedic911 force-pushed the aditya/add-replay-to-smoke-tests branch from 36c2e77 to 4e2fc84 Compare May 21, 2024 22:45
Copy link

replay-io bot commented May 21, 2024

Status Complete ↗︎
Commit f48573a
Results
⚠️ 1 Flaky
  • RBAC: Should not be able to delete contact as non-admin user (Replay 1, Replay 2, Replay 3, Replay 4, Replay 5, Replay 6, Replay 7, Replay 8, Replay 9, Replay 10, Replay 11)
  • 22 Passed
  • check favicon.png (Replay 1, Replay 2, Replay 3, Replay 4)
  • check robots.txt (Replay 1, Replay 2, Replay 3, Replay 4)
  • Check that a specific blog post is prerendered (Replay 1, Replay 2, Replay 3)
  • Check that about is prerendered
  • Check that homepage is prerendered (Replay 1, Replay 2, Replay 3)
  • Check that meta-tags are rendering the correct dynamic data
  • Check that rehydration works for page not wrapped in Set (Replay 1, Replay 2, Replay 3)
  • Check that rehydration works for page with Cell in Set (Replay 1, Replay 2, Replay 3)
  • Check that rehydration works for page with code split chunks (Replay 1, Replay 2, Replay 3)
  • Check that you can navigate from home page to specific blog post (Replay 1, Replay 2, Replay 3)
  • Fragments (Replay 1, Replay 2)
  • Loads Cell mocks when Cell is nested in another story (Replay 1, Replay 2)
  • Loads Cell stories (Replay 1, Replay 2)
  • Loads MDX Stories (Replay 1, Replay 2)
  • Mocks current user, and updates UI while dev server is running (Replay 1, Replay 2)
  • prerender with broken gql query
  • RBAC: Admin user should be able to delete contacts (Replay 1, Replay 2)
  • requireAuth graphql checks (Replay 1, Replay 2)
  • Smoke test with dev server (Replay 1, Replay 2)
  • Smoke test with rw serve (Replay 1, Replay 2)
  • useAuth hook, auth redirects checks (Replay 1, Replay 2, Replay 3, Replay 4)
  • Waterfall prerendering (nested cells)
  • @callingmedic911 callingmedic911 force-pushed the aditya/add-replay-to-smoke-tests branch 6 times, most recently from 5800c77 to 89179e5 Compare May 22, 2024 19:38
    @callingmedic911 callingmedic911 added this to the next-release milestone May 22, 2024
    @callingmedic911 callingmedic911 added the release:chore This PR is a chore (means nothing for users) label May 22, 2024
    @callingmedic911 callingmedic911 modified the milestones: next-release, chore May 22, 2024
    @callingmedic911 callingmedic911 added the changesets-ok Override the changesets check label May 22, 2024
    @callingmedic911 callingmedic911 force-pushed the aditya/add-replay-to-smoke-tests branch 6 times, most recently from c2595c2 to 8b84e98 Compare May 23, 2024 21:46
    @ahaywood
    Copy link
    Contributor

    @callingmedic911 Thanks for opening this PR! ... I know it's still in Draft mode, but I wanted to go ahead and point out that one of the things that we've been paying careful attention to with Replay in our repo is speed. So, as you're working on this, would you mind to pay special attention to that? ❤️

    @callingmedic911
    Copy link
    Member Author

    @ahaywood Hello! Do you mean the speed of CI runs here? Or the performance of the framework? Replay adds very little overhead for recording. As for the latter, Replay is soon shipping Performance Analysis, which would be really useful in finding performance regression in the framework.

    @callingmedic911 callingmedic911 force-pushed the aditya/add-replay-to-smoke-tests branch 4 times, most recently from 26c3c61 to 218e84a Compare May 27, 2024 19:32
    @callingmedic911 callingmedic911 force-pushed the aditya/add-replay-to-smoke-tests branch from 218e84a to a0044eb Compare May 27, 2024 19:48
    @callingmedic911 callingmedic911 marked this pull request as ready for review May 27, 2024 20:04
    @callingmedic911
    Copy link
    Member Author

    @dac09 followup on our "failing test on Replay" discussion: I have filed an issue internally and as a workaround, I'm running that test on Chromium instead.

    I tagged you guys because you have the most context, but feel free to pass and / or ask questions. :)

    @ahaywood
    Copy link
    Contributor

    @callingmedic911 I'm going to rope @Tobbe in to help provide additional context.

    @Tobbe Tobbe merged commit 14d9535 into main May 30, 2024
    46 checks passed
    @Tobbe Tobbe deleted the aditya/add-replay-to-smoke-tests branch May 30, 2024 07:59
    @Tobbe
    Copy link
    Member

    Tobbe commented May 30, 2024

    @callingmedic911 Thanks for doing all the work of integrating Replay with our smoke tests

    Copy link
    Collaborator

    dac09 commented May 30, 2024

    I think we need to add the API keys! Getting failures on other PRs

    Error: `@replayio/playwright/reporter` requires an API key to upload recordings.
    Either pass a value to the apiKey plugin configuration or set the REPLAY_API_KEY environment variable
    

    Copy link
    Member

    Tobbe commented May 30, 2024

    Weird. I added that last week

    image

    dac09 added a commit to dac09/redwood that referenced this pull request May 30, 2024
    …into feat/location-serverStore
    
    * 'feat/location-serverStore' of github.com:dac09/redwood:
      no need to repeat fullUrl
      Use Replay for smoke tests (redwoodjs#10664)
      chore(testing): Remove unused member in Props interface (redwoodjs#10699)
      fix(cli): Directive generator command was not creating files (redwoodjs#10698)
      Always execute the <Metadata> component on the client (redwoodjs#10271)
    @callingmedic911
    Copy link
    Member Author

    Looking into it.

    Josh-Walker-GM pushed a commit that referenced this pull request May 30, 2024
    Tobbe added a commit to Tobbe/redwood that referenced this pull request May 31, 2024
    @Josh-Walker-GM Josh-Walker-GM modified the milestones: chore, v8.0.0 Sep 4, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    changesets-ok Override the changesets check release:chore This PR is a chore (means nothing for users)
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    5 participants