-
Notifications
You must be signed in to change notification settings - Fork 198
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
kie-issues#1114: Containerize Playwright end-to-end tests to resolve screenshot comparison issues caused by OS differences #2866
base: main
Are you sure you want to change the base?
Conversation
Thank you @ljmotta . Please, let us know this is ready for a verification. I will try on non-MAC environment. |
@jomarko This PR can be tested for macOS and Linux. I still need to make some adjustments for native Windows (non WSL). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome PR @ljmotta! This will make our e2e tests more stable and concise!
I've made some comments below about the package.json scripts; let me know what you think.
Co-authored-by: Thiago Lugli <[email protected]>
Status update regarding Windows. My current setup with Docker CLI + Docker WSL didn't work, as WSL doesn't handle Windows symlinks [1][2], which is heavily used by |
Maybe try hard links @ljmotta? I think we had a similar issue with |
@tiagobento The symlinks are located in the
Even if the second issue were resolved, having to fix the first issue every time a container is started would be impractical. Considering these challenges, I am leaning toward not supporting Windows development without WSL for this pull request. [1] microsoft/playwright#23098 (comment) |
@ljmotta I'm ok with not supporting Windows without WSL here, just please add a new statement to the README making that explicit. And thank you so much for the effort! |
packages/root-env/env/index.js
Outdated
containerizedEndToEndTests: { | ||
run: str2bool(getOrDefault(this.vars.KIE_TOOLS_BUILD__runContainerizedEndToEndTests)), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think the KIE_TOOLS_BUILD__runEndToEndTests
env var should still be the one use to toggle the execution of the E2E tests, and this new flag should only toggle the MODE with which the tests run.
KIE_TOOLS_BUILD__runEndToEndTests=false
# E2E tests don't run and `KIE_TOOLS_BUILD__runContainerizedEndToEndTests` is ignored.
KIE_TOOLS_BUILD__runEndToEndTests=true
KIE_TOOLS_BUILD__runContainerizedEndToEndTests=true
# E2E tests run inside containers
KIE_TOOLS_BUILD__runEndToEndTests=true
KIE_TOOLS_BUILD__runContainerizedEndToEndTests=false (default)
# E2E tests run on host machine (without containers involved)
WDYT?
packages/dmn-editor/tests-e2e/__containerization__/playwright-docker-compose.yml
Outdated
Show resolved
Hide resolved
packages/dmn-editor/tests-e2e/__containerization__/playwright-docker-compose.yml
Outdated
Show resolved
Hide resolved
packages/dmn-editor/tests-e2e/__containerization__/playwright-docker-compose.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: Tiago Bento <[email protected]>
Closes apache/incubator-kie-issues#1114
Closes #2839
Description
This PR introduces containerized end-to-end (E2E) Playwright tests to ensure consistent and reliable test execution across environments.
Tests were executed in the following environments:
Known Issues
Trying it out
@kie-tools/playwright-base
image with the following command:Updating screenshots
To update screenshots, use the
pnpm test-e2e:container:shell
script to open a shell inside the container:To improve performance, you can filter which tests will run by adding the
-g
flag:pnpm test-e2e:run -u -g "test name"