Skip to content

fix: stop coverage without start#4947

Merged
aaltat merged 1 commit into
MarketSquare:mainfrom
aaltat:coverage
Jun 5, 2026
Merged

fix: stop coverage without start#4947
aaltat merged 1 commit into
MarketSquare:mainfrom
aaltat:coverage

Conversation

@aaltat
Copy link
Copy Markdown
Member

@aaltat aaltat commented Jun 5, 2026

Fixes: #3991

Copilot AI review requested due to automatic review settings June 5, 2026 21:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses issue #3991 by ensuring Stop Coverage behaves correctly (and logs accurately) when coverage was never started for the active page, avoiding misleading “report generated” behavior.

Changes:

  • Node side returns a sentinel body (ROBOT_FRAMEWORK_BROWSER_NO_SET) when stopping coverage without a prior start.
  • Python keyword stop_coverage detects that sentinel, logs that no report was generated, and returns None.
  • Adds an acceptance test covering the “only stop coverage” scenario and verifying the expected logs and return value.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
node/playwright-wrapper/playwright-state.ts Returns a sentinel value instead of an empty string when coverage was not started.
Browser/keywords/coverage.py Interprets the sentinel, logs “no report generated”, and returns None.
atest/test/01_Browser_Management/coverage.robot Adds an acceptance test validating logs and ${None} return when only Stop Coverage is called.

Comment thread Browser/keywords/coverage.py
@aaltat aaltat merged commit 7767be7 into MarketSquare:main Jun 5, 2026
41 of 43 checks passed
@aaltat aaltat deleted the coverage branch June 5, 2026 21:54
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.

If calling Stop Coverage for a page where Start Coverage is not called, logging of the keyword is wrong

2 participants