Skip to content

test(e2e): Add E2E Test recipe framework #5836

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

Merged
merged 14 commits into from
Sep 28, 2022
Merged

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Sep 27, 2022

Ref: #5506

Adds the functionality to the E2E tests package to configure test recipes alongside very simple examples. E2E tests can be configured by adding standalone test applications to the test-applications folder containing a test-recipe.json file.

Via the test-recipe.json we can configure a buildCommand (that is run once, and is supposed to build the test application) and any number of tests that each have a testCommand. This command is supposed to actually conduct the test and verify the behavior of apps or SDKs.

These commands are left very generic intentionally so that we stay flexible on how we can conduct tests. (e.g. some may want to run Playwright, some only run a node script, some may start a fake server, others might want to send events to prod sentry, etc.)

The important part is, that in the context of these commands, there is a test registry available at http://localhost:4873 that hosts all of the current Sentry packages. This allows us for example to simply do yarn install --registry http://localhost:4873 in the buildCommand in order to install our packages as they would look like if we did a release on the current branch.

Visit this PR to see what failing E2E tests look like.

@lforst lforst added this to the E2E Tests milestone Sep 27, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.46 KB (-0.03% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 60.23 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.09 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 53.16 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 19.85 KB (0%)
@sentry/browser - Webpack (minified) 64.49 KB (0%)
@sentry/react - Webpack (gzipped + minified) 19.87 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 44.78 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 25.92 KB (-0.01% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.36 KB (-0.01% 🔽)

@lforst lforst mentioned this pull request Sep 28, 2022
9 tasks
@lforst lforst requested review from AbhiPrasad and Lms24 September 28, 2022 15:07
@lforst lforst marked this pull request as ready for review September 28, 2022 15:07
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Reviewed in person with Luca.

Main point that came up was if we restrict the test scenarios to be more defined

"type": "string",
"description": "Name displayed in test output"
},
"buildCommand": {
Copy link
Member

Choose a reason for hiding this comment

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

we should also add a timeout for build commands

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in 114ae0d

@lforst lforst merged commit 2cda2bb into master Sep 28, 2022
@lforst lforst deleted the lforst-recipe-based-e2e-setup branch September 28, 2022 16:44
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.

2 participants