Skip to content

Conversation

@logaretm
Copy link
Collaborator

@logaretm logaretm commented Dec 10, 2025

I have been running a lot of Next.js tests and needed to run specific variants against my changes, so I made these changes to our test runner script and thought to share it with everyone.

yarn test:run <app-name> --variant <variant-name>

Closes #18459 (added automatically)

@logaretm logaretm requested review from Lms24 and s1gr1d December 10, 2025 12:17
@logaretm logaretm marked this pull request as ready for review December 10, 2025 12:17
Copilot AI review requested due to automatic review settings December 10, 2025 12:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a --variant flag to the E2E test runner, enabling developers to run specific test variants (e.g., different Next.js versions) against individual test applications.

  • Adds --variant flag parsing to support both --variant=<name> and --variant <name> formats
  • Implements variant matching logic that reads variant configurations from test application package.json files
  • Updates documentation with usage examples and explanation of variant matching behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
dev-packages/e2e-tests/run.ts Adds interfaces for variant configuration, implements variant flag parsing and matching logic, integrates variant build commands into test execution flow
dev-packages/e2e-tests/README.md Documents the new --variant flag usage with examples and explains the case-insensitive partial matching behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.81 kB - -
@sentry/browser - with treeshaking flags 23.3 kB - -
@sentry/browser (incl. Tracing) 41.55 kB - -
@sentry/browser (incl. Tracing, Profiling) 46.14 kB - -
@sentry/browser (incl. Tracing, Replay) 79.97 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.7 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 84.64 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 96.89 kB - -
@sentry/browser (incl. Feedback) 41.52 kB - -
@sentry/browser (incl. sendFeedback) 29.49 kB - -
@sentry/browser (incl. FeedbackAsync) 34.48 kB - -
@sentry/react 26.52 kB - -
@sentry/react (incl. Tracing) 43.75 kB - -
@sentry/vue 29.27 kB - -
@sentry/vue (incl. Tracing) 43.36 kB - -
@sentry/svelte 24.82 kB - -
CDN Bundle 27.24 kB - -
CDN Bundle (incl. Tracing) 42.23 kB - -
CDN Bundle (incl. Tracing, Replay) 78.75 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 84.21 kB - -
CDN Bundle - uncompressed 80.04 kB - -
CDN Bundle (incl. Tracing) - uncompressed 125.39 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 241.42 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 254.18 kB - -
@sentry/nextjs (client) 45.97 kB - -
@sentry/sveltekit (client) 41.92 kB - -
@sentry/node-core 51.5 kB +0.01% +1 B 🔺
@sentry/node 159.81 kB - -
@sentry/node - without tracing 92.91 kB - -
@sentry/aws-serverless 108.44 kB - -

View base workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,619 - 8,957 -4%
GET With Sentry 1,710 20% 1,711 -0%
GET With Sentry (error only) 5,954 69% 6,023 -1%
POST Baseline 1,194 - 1,167 +2%
POST With Sentry 575 48% 559 +3%
POST With Sentry (error only) 1,014 85% 1,035 -2%
MYSQL Baseline 3,240 - 3,296 -2%
MYSQL With Sentry 456 14% 461 -1%
MYSQL With Sentry (error only) 2,672 82% 2,589 +3%

View base workflow run

@logaretm logaretm force-pushed the awad/variant-test-runner-script branch from 0366df2 to 11ce429 Compare December 10, 2025 16:29
@logaretm logaretm force-pushed the awad/variant-test-runner-script branch from 11ce429 to 86126e5 Compare December 10, 2025 16:47
@logaretm logaretm changed the title chore(tests): Added variant flag chore(tests): Added test variant flag Dec 10, 2025
yarn test:run <app-name> --variant <variant-name>
```

Variant name matching is case-insensitive and partial. For example, `--variant 13` will match `nextjs-pages-dir (next@13)` if a matching variant is present in the test app's `package.json`.
Copy link
Member

Choose a reason for hiding this comment

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

l: can we show an example of the package.json entry? I'm aware this existed before but I think it's worth mentioning it more explicitly in the readme

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense, I added an example

@logaretm logaretm merged commit 7752d60 into develop Dec 11, 2025
402 of 405 checks passed
@logaretm logaretm deleted the awad/variant-test-runner-script branch December 11, 2025 17:01
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.

chore(tests): Added variant flag

3 participants