Skip to content

Fix deprecation warnings and improve logging in tests#1974

Open
yuriverweij wants to merge 3 commits intorobotframework:masterfrom
yuriverweij:fix/unittest-fix-deprecation-and-improve-logging
Open

Fix deprecation warnings and improve logging in tests#1974
yuriverweij wants to merge 3 commits intorobotframework:masterfrom
yuriverweij:fix/unittest-fix-deprecation-and-improve-logging

Conversation

@yuriverweij
Copy link
Copy Markdown
Member

@yuriverweij yuriverweij commented Apr 7, 2026

Testing utility improvements:

  • Replaced the use of verifyNoMoreInteractions with ensureNoUnverifiedInteractions in utest/test/keywords/test_browsermanagement.py as fix for deprecation.

Test reporter enhancements:

  • Changed the reporter setup in utest/test/api/test_plugin_documentation.py to use FirstWorkingReporter with a fallback to PythonNativeReporter, to give better readable logging in pipeline runs.
    Now when a test fails in CI, instead of the ReporterNotWorkingException, we get a full inline diff printed to log showing exactly what changed. FirstWorkingReporter will try the GUI diff tool first (useful locally if Diffuse is installed), and fall back to PythonNativeReporter

Copy link
Copy Markdown

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

Updates test utilities and approval-test reporting to remove deprecation warnings and make failure reporting more robust.

Changes:

  • Replaced deprecated verifyNoMoreInteractions with ensureNoUnverifiedInteractions in a browser management unit test.
  • Updated approval-test reporter selection to use FirstWorkingReporter with a PythonNativeReporter fallback.
  • Synced approval “golden” output and corrected a doc example typo/formatting in SeleniumLibrary’s documentation text.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

File Description
utest/test/keywords/test_browsermanagement.py Removes deprecated Mockito API usage by switching to ensureNoUnverifiedInteractions.
utest/test/api/test_plugin_documentation.py Wraps reporter selection with FirstWorkingReporter(..., PythonNativeReporter()) to improve failure reporting behavior.
utest/test/api/approved_files/PluginDocumentation.test_many_plugins.approved.txt Updates approved output to match current generated plugin documentation formatting.
src/SeleniumLibrary/init.py Fixes documentation table content (${element }${element}) so generated docs/approvals align.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yuriverweij yuriverweij marked this pull request as ready for review April 7, 2026 18:46
@yuriverweij yuriverweij requested a review from emanlove April 7, 2026 18:46
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