Skip to content

test: add unit tests for format_stacktrace and MobileErrorHandler - #17

Closed
Dor-bl wants to merge 2 commits into
masterfrom
test/errorhandler-stacktrace-coverage-12118612994822022523
Closed

Dor-bl wants to merge 2 commits into
masterfrom
test/errorhandler-stacktrace-coverage-12118612994822022523

Conversation

@Dor-bl

@Dor-bl Dor-bl commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Adds unit test coverage for format_stacktrace and MobileErrorHandler in test/unit/webdriver/errorhandler_test.py.

🎯 What: Missing unit tests for format_stacktrace and MobileErrorHandler.check_response in appium/webdriver/errorhandler.py.
📊 Coverage: Added test cases covering:

  • None, empty string, and empty list inputs for format_stacktrace.
  • Multi-line string stack traces.
  • Frame dictionaries with complete fields (lineNumber, fileName, methodName, className).
  • Frame dictionaries with missing fields (defaulting to <anonymous>).
  • Sequence containing non-dictionary elements.
  • Non-iterable inputs that trigger TypeError.
  • MobileErrorHandler.check_response logic including payload parsing, standard errors, custom Appium exception mappings (NoSuchContextException, InvalidSwitchToTargetException), and UnexpectedAlertPresentException.
    ✨ Result: 100% test coverage for appium/webdriver/errorhandler.py.

PR created automatically by Jules for task 12118612994822022523 started by @Dor-bl

claude and others added 2 commits September 12, 2026 22:34
The Release workflow triggers on every push to master. On a fork that means
semantic-release rewrites the version in pyproject.toml, commits the change to
the default branch, tags it and then tries to publish the result to PyPI under
the upstream package name.

Gate the job on the repository name so forks keep a clean master.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjZRpyoEfSCLjTx5ctzQmJ
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Add exact-type assertions for the fallback and NoSuchContextException mappings.

Review effort: Lite
Findings: None

What changed in this PR

Adds unit tests for format_stacktrace and MobileErrorHandler.check_response.

Changes:

  • Covers stacktrace formatting and edge cases.
  • Tests standard, custom, alert, malformed, and fallback error handling.
File Description
test/​unit/​webdriver/​errorhandler_test.py Adds comprehensive error-handler unit-test coverage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

3 participants