Skip to content

Conversation

@bmos
Copy link

@bmos bmos commented Dec 2, 2025

Increase coverage from 67% to 80+% and fix issues that were causing constant and intermittent test failures.

Updated Tests

  • Use local cookie data instead of relying on external server for cookie testing
  • Use local html instead of relying on external server for tests
  • Quit browser after tests finish
  • Re-use test fixture instance across tests for greatly reduced test runtime
  • Less redundant code in session test fixture
  • Optimize session.driver fixture for CI workflows (disabling unused features)

New Tests

  • Add cookie test for transferring driver cookies to session
  • Add tests for creating session object with various options (prefs, options, experimental options, extensions, etc)
  • Add test for moving cookies with domain filter
  • Add tests for all ensure_element* methods
  • Add tests for ensure_click* function
  • Add tests for ensure_add_cookie method

Module Code Changes

Cherry pick commits from other PRs to get checks passing (only touches test and workflow code, no module code)

@bmos bmos mentioned this pull request Dec 2, 2025
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  requestium
  requestium_mixin.py
  requestium_session.py
Project Total  

This report was generated by python-coverage-comment-action

@bmos bmos mentioned this pull request Dec 2, 2025
@bmos bmos force-pushed the test-improvements branch from 07d69d6 to 0a3ad83 Compare December 2, 2025 23:01
@bmos bmos force-pushed the test-improvements branch from 77aa348 to 005af3f Compare December 2, 2025 23:43
@bmos bmos force-pushed the test-improvements branch from a06ad18 to 875e27b Compare December 3, 2025 02:12
@bmos
Copy link
Author

bmos commented Dec 3, 2025

Okay this is totally done, I hit hyperfocus adding tests to increase coverage and kept coming back 🙄

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.

1 participant