Skip to content

Conversation

@bmos
Copy link
Contributor

@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 fixture's driver instance for CI workflows (disabling unused features)
  • Add pre-test validation of session fixture to avoid discarded window context errors that intermittently occur.

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

@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
Contributor Author

bmos commented Jan 10, 2026

@lordjabez when you get a chance please take a look at this PR. It will resolve the ongoing testing issues.

@lordjabez lordjabez merged commit 9c5e8fd into tryolabs:master Jan 11, 2026
26 checks passed
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.

2 participants