-
Notifications
You must be signed in to change notification settings - Fork 323
[test] Add docker-compose to faciliate browser test execution #4441
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
base: main
Are you sure you want to change the base?
[test] Add docker-compose to faciliate browser test execution #4441
Conversation
3fdd3a0
to
ed38526
Compare
- Add Dockerfile for containerized ComfyUI with frontend build - Add docker-compose.test.yml for running tests in isolation - Add Dockerfile.playwright for Playwright test container - Add npm script for running Docker-based browser tests - Configure proper networking, health checks, and volume mounts - Set up HTML report generation and port forwarding
…ing thrown in Comfy backend
ed38526
to
672013a
Compare
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.
If the primary issue with local testing is screenshots due to things like FreeType vs. DirectWrite, isn't this change the only thing that's necessary?
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.
I actually think this is not something we can merge. 😅
At only 1024x768, this ignores anything that changes less than 23,000 pixels. It would cripple the usefulness of playwright.
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.
I am running on a mac. Since the only screenshots committed to the repository are linux based screenshots, i need to execute these tests in a linux based execution environment in order to properly validate there are no visual regressions.
Also as a new developer, i found the initial setup complex -- Docker cleanly abstracts that initial setup and server startup.
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.
I actually think this is not something we can merge. 😅
At only 1024x768, this ignores anything that changes less than 23,000 pixels. It would cripple the usefulness of playwright.
Ah fair point. We could lower the tolerance? I was most often seeing differences at less than 1%. Also note, this is only in effect during local testing. Github Actions will still check for exact matches
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.
I'm super curious about the discrepancies, and wonder if it's just a difference between the image GH actions uses and the docker image? As the display should be virtualised too, we may be able to get pixel-perfect.
I can take a look on mac/windows and see if anything stands out (likely within a day or two).
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.
I actually think this is not something we can merge. 😅
At only 1024x768, this ignores anything that changes less than 23,000 pixels. It would cripple the usefulness of playwright.
Summary
Improves Playwright browser test infrastructure by adding Docker support and fixing cross-platform compatibility issues.
Problem
The existing browser test setup was complex and had several issues:
Solution
Docker Infrastructure
Dockerfile
: Multi-stage build for ComfyUI with built frontend, includes system dependencies for PyTorchdocker-compose.test.yml
: Orchestrates ComfyUI backend and Playwright test containers with proper networking and health checksDockerfile.playwright
: Dedicated container for running Playwright tests with all browsers pre-installednpm run test:browser:docker
: Single command to run entire test suite in containersCross-Platform Compatibility
*-darwin.png
) to prevent commit conflictsUser Context Fixes
users.json
to fix errors logged in the backend API logs.Benefits
npm run test:browser:docker
runs complete test suiteUsage
┆Issue is synchronized with this Notion page by Unito