Skip to content

Conversation

@bupd
Copy link
Contributor

@bupd bupd commented Oct 1, 2025

Tracking Issue: goharbor/harbor#22134

@bupd bupd requested review from a team as code owners October 1, 2025 10:50
@bupd bupd force-pushed the migrate-e2e-proposal branch from 7534034 to 10ae484 Compare October 1, 2025 13:20
@MinerYang
Copy link
Contributor

MinerYang commented Oct 28, 2025

Hi @bupd ,

We may need more thoroughly mindful investigation on the harbor whole robot-case code base, especially on the UI part.
Generally , robot framework has more maturely ecosystem and plentiful extensions that utilized or could be utilized in the future cases, however playwright may has more narrower usability-scope. The key criteria is we need a Cross-environment, Containerized, Cli-keyworkd-driven orchestration with Unified traceable report for the whole test framework instead of just simply running on the git-actions.
If you go through more details on our current robot cases and running manually by yourself, you could easily get that there's some limitations that current robot case could handle easily however playwrite does not.

  • Cross-environment orchestration (shell, processes, SSH)
    Robot suites invoke host/container CLIs heavily via OperatingSystem and Process keywords (docker/helm/imgpkg/cosign/notation/oras/singularity), and remote ops via SSHLibrary. This makes complex end-to-end, infra-level flows first-class.
    In Playwright, you’d have to re-implement these as custom Node/Python scripts (subprocess/child_process, ssh2/paramiko) with your own retry, logging, and reporting around them which would not be a best practice. especially in a graduate project.
    *** Settings ***
    Library  OperatingSystem
    Library  String
    Library  Collections
    Library  requests
    Library  Process
    Library  SSHLibrary  1 minute
    Library  DateTime
    Library  SeleniumLibrary  60  10
    Library  JSONLibrary
    Resource  Harbor-Util.robot
   ...
  • Keyword-driven composition, readability, and reuse across infrastructure and UI
    Robot’s .robot resources layer UI pages, infra utilities, and APIs into readily composable keywords, with built-in retries and waits in keywords. Plus, keywords driven would also benefit the case controlling across environment.
    Playwright Test is excellent for UI, but mixing in infra operations typically results in imperative code; step-level reporting for those custom flows requires additional work.

  • Unified HTML logs/reporting for UI + infra steps
    Robot provides rich keyword-level HTML logs with screenshots and nested steps for both browser and non-browser actions, out of the box.
    Playwright’s HTML reporter is strong for UI steps but you must explicitly annotate custom infra steps to reach parity, and you’ll still have to stitch multi-tool outputs and artifacts yourself.

  • Containerization: what works smoothly with Robot vs Playwright
    *Robot is easily to achieve cmd in a single image with infra CLIs
    The current suite expects system-level tools and paths (/usr/bin/google-chrome, /go/selenium-server-standalone-3.4.0.jar, /drone/download), making it natural to build a purpose image that bundles:
    Browsers + chromedriver + Selenium JAR
    CLI tools: docker, helm, imgpkg, cosign, notation, oras, singularity, curl, jq, etc.
    Python libs: Robot Framework, SeleniumLibrary, requests, JSONLibrary, SSHLibrary, etc.
    Running via CLI is trivial: robot [options] tests/robot-cases/....
    Playwright image with infra CLIs is possible but heavier and trickier
    The official Playwright images bundle browsers; adding all the additional CLIs and enabling docker/helm interactions typically requires:
    Larger image and maintenance for many native deps.
    Privileged mounts (e.g., -v /var/run/docker.sock:/var/run/docker.sock) or DinD; plus credentials, kube config, etc.
    Re-implementing SSH, process orchestration, and retries in code or utilities.
    It’s doable, but you’ll lose the turnkey keyword orchestration and reporting that Robot already provides for non-UI tasks.

@bupd
Copy link
Contributor Author

bupd commented Oct 28, 2025

@MinerYang

The key criteria is we need a Cross-environment, Containerized, Cli-keyworkd-driven orchestration with Unified traceable report for the whole test framework instead of just simply running on the git-actions.

I don't get this. Why do we need a cross environment - what cross environment mean here ?? Please explain.

Playwright image with infra CLIs is possible but heavier and trickier
The official Playwright images bundle browsers; adding all the additional CLIs and enabling docker/helm interactions typically requires:
Larger image and maintenance for many native deps.
Privileged mounts (e.g., -v /var/run/docker.sock:/var/run/docker.sock) or DinD; plus credentials, kube config, etc.
Re-implementing SSH, process orchestration, and retries in code or utilities.
It’s doable, but you’ll lose the turnkey keyword orchestration and reporting that Robot already provides for non-UI tasks.

This makes no sense. The goal is clearly mentioned here https://github.com/goharbor/community/pull/268/files#diff-e9c149ab1ab59f390feca2254d8ccd8c76643c1016b5e6651c7dcd712341ada2R26
Replace UI/XPath-based Robot tests with Playwright.

We are not removing Robot from areas where it might be the right tool. I am sure that for UI tests robot is a inadequate tool.

We are eliminating XPath-dependent UI flakiness by shifting only those tests to Playwright.

@MinerYang
Copy link
Contributor

MinerYang commented Oct 29, 2025

Hi @bupd ,

Generally, One of our key acceptance standards is do not decrease the current quality which would reflects in these criteria that you need to take it consideration:

  • Cross-environment and containerization
    We need an orchestration that needs convenient to be portable, which allows us to be easily imported as a tool such as a container that could be utilized in different environments like Jenkins, any shell, or CICD env for different network topology (like air-gaped) rather than just running on a fixed public git action CI. And would the containerized playwright image become more heavier? AFAK Playwright is not optimized for heavy system orchestration.

  • Keyword-driven infra
    We need an keyword-driven infrastructure that each of the case is relatively dependent and plugable, which allow tester to define which test-case need to running in different to be skip or running easily by a cli keyword.

  • Unified HTML logs/reporting
    We need an unified, readable and easy-tracking log/report for the test process. You could compare the current harbor robot case log and investigate more could the playwright generate a equivalent trace report and how to achieve so.

  • System process and tools maintenance
    If your dig deeper into the current harbor robot case, you would see some of cases heavily rely on the system process (docker.daemon), system libraries(SSHLibraries, JSONLibrary etc. ), apt tools(curl) or third-party tools like helm, cosign, notation. Here are some race conditions that I know playwright may not handle well. e.g. If there's any gap like SSHLibraries hasn't well-inplemented in the playwright ecosystem, how do you plan to handle situations? Or running CLI tools like docker push or cosign verify are network and I/O heavy, when we have this along with our test-flow, would the performance be affect if when we are using execAsync...
    RobotFramework can manage resources explicitly via setup/teardown keywords and runs tasks sequentially by default. However Playwright parallel test workers may all try to start dockerd at the same time which leads to failures, hangs like port conflicts socket block or unpredictable error.

  • Other thoughts
    Besides some of our current case that needs key or credential which can’t run safely in sandboxed CI environments (like GitHub Actions or GitLab runners) which would leads to accidentally leaks credentials or keys in logs.

Could you please help to demonstrate in your proposal how to achieve above goals or solutions for the potential issues?

Best,
Miner

@reasonerjt
Copy link
Contributor

@Vad1mo @OrlinVasilev

I believe there're still disagreements about this proposal. Miner has expressed a lot of concerns in last week's community meeting.

We should make sure the comments are resolved before this proposal can be merged.

Copy link
Contributor

@MinerYang MinerYang left a comment

Choose a reason for hiding this comment

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

Hi @bupd
Please help to update the proposal per this comment and the discussion we had last month.
#268 (comment)

Best,
Miner

@bupd
Copy link
Contributor Author

bupd commented Nov 11, 2025

@Vad1mo @OrlinVasilev

I believe there're still disagreements about this proposal. Miner has expressed a lot of concerns in last week's community meeting.

We should make sure the comments are resolved before this proposal can be merged.

@reasonerjt I would like to clarify that the concerns have been addressed in the previous community meeting. I was in OSS summit for past week. currently getting back on this.

Only thing pending on this is to update the proposal with screenshots of reports and add more info on the running this containerised, environments. as we discussed earlier

I am currently recovering will update the proposal shortly.

Thanks for understanding

@bupd
Copy link
Contributor Author

bupd commented Dec 10, 2025

@MinerYang @stonezdj @reasonerjt All concerns have been addressed.


### Portability & Containerization
- Playwright works consistently across Jenkins, GitHub Actions, GitLab, air-gapped networks, and plain shell environments.
- A single container image can include Playwright browsers + required CLIs (docker, helm, cosign, notation, oras, curl, jq).
Copy link
Contributor

Choose a reason for hiding this comment

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

For the whole containerized process, I 'believe that you've had a PoC of all these criteria. Could you please help to adding more details , like:

e.g.

E2E_IMAGE=goharbor/harbor-e2e-engine:play-wright-ui
# Run tests by title
docker run -i -v <....>  -e <....>  -w <...> $E2E_IMAGE npx playwright test -g "add a todo item"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i will update the proposal with details of these. also give a simple example

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, And all these details would be better to presents in the proposal.

- It supports fixtures and helper modules. https://playwright.dev/docs/test-fixtures
- Skipping, tagging, grouping, and environment-driven execution are built-in https://playwright.dev/docs/test-annotations
- Playwright can run CLI operations via Node's `child_process` reliably (docker, helm, oras, cosign, notation).
- Reports, videos, traces, retries, and serial execution already meet & exceed current quality standards.
Copy link
Contributor

@MinerYang MinerYang Dec 10, 2025

Choose a reason for hiding this comment

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

I would like better to have a full-chain build and running process demo for several specific cases, and presents the demo in the proposal as a Poc.

These cases demo should have presents these criteria I have mentioned before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bupd bupd force-pushed the migrate-e2e-proposal branch 3 times, most recently from 88041b7 to f3d3a2f Compare December 29, 2025 11:37
bupd added 6 commits December 29, 2025 17:08
Expand on the benefits and features of using Playwright for UI testing, including portability, containerization, and improved debugging capabilities. Outline goals and non-goals for the migration process from Robot tests to Playwright.

Signed-off-by: Prasanth Baskar <[email protected]>
Add Technical Considerations section covering:
- Process orchestration and parallelism handling
- Credential safety in CI environments
- SSH operations support
- Reporting comparison with Robot Framework

Clarify proposal scope to UI E2E tests only, with infrastructure tests remaining in Robot Framework.

Remove bold formatting per style guide.

Signed-off-by: bupd <[email protected]>
Update Dockerfile to Ubuntu 20.04-based image matching Robot Framework structure.
Add comprehensive Q&A section answering:
- How running commands look like (Docker and direct execution)
- Keyword-driven execution support with real examples

Include references to PRs #22462 and #22591 showing actual implementation.

Signed-off-by: bupd <[email protected]>
…hots

Add three screenshots demonstrating Playwright reporting capabilities:
- HTML test report showing all tests passing
- Video recording feature in test reports
- Interactive debug mode with Playwright Inspector

Signed-off-by: bupd <[email protected]>
@bupd bupd force-pushed the migrate-e2e-proposal branch from f3d3a2f to 0374737 Compare December 29, 2025 11:39
@bupd
Copy link
Contributor Author

bupd commented Dec 29, 2025

@MinerYang @stonezdj @reasonerjt
I have updated the proposal to now include POC Dockerfile (Ubuntu 20.04-based, matching Robot's structure with same permissions and all tools: docker, helm, cosign, notation, chrome, etc., just with Playwright instead of Robot Framework), demonstrates keyword-driven execution, superior reporting with screenshots, and containerization for Jenkins/GitLab/air-gapped environments while scoping to UI tests only.

also added relevant screenshots of test reports, debugging, networking capabilities. please take a look.

Thanks

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.

6 participants