aerokube / moon

Browser automation solution for Kubernetes and Openshift supporting Selenium, Playwright, Puppeteer and Cypress
http://aerokube.com/moon/latest
Apache License 2.0
224 stars 19 forks source link

Add Feature to Export HAR File After Test Run #426

Closed dkuznetsov21 closed 1 month ago

dkuznetsov21 commented 5 months ago

New Feature: Export HAR File After Test Run

Description

We need to add a feature to export a HAR file at the end of the test run before closing the browser. This file will contain useful information about network requests, which will help in debugging issues. The HAR file name should include the session ID to simplify test identification.

Why It's Needed

This feature will be especially helpful in investigating flaky tests. When a test fails, something doesn't load, or something takes too long to load, having the HAR file will quickly help identify and fix the problem.

Full Workflow

  1. The test is started.
  2. The HAR file is populated with information.
  3. Before closing the browser, the HAR file is exported to the Moon machine.
  4. I can access this file via the Moon API and upload it to the necessary location (e.g., ReportPortal to include it with other test logs).

Acceptance Criteria

Additional Information

This feature will significantly simplify the debugging process and make it more efficient and faster.