test(tools): comprehensive test suite for browser_tools module (+75 tests) - #184
Open
manus-use wants to merge 1 commit into
Open
test(tools): comprehensive test suite for browser_tools module (+75 tests)#184manus-use wants to merge 1 commit into
manus-use wants to merge 1 commit into
Conversation
This was referenced Aug 10, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive test suite for the
browser_toolsmodule (src/manus_agent/tools/browser_tools.py) — previously at zero dedicated test coverage.What's tested (75 tests)
Module importability (4 tests)
BROWSER_USE_AVAILABLEflag type check@tooldecorator verificationBrowserAgentSession.init (7 tests)
browser_usesectionbrowser_useattribute fallbackBrowserAgentSession._get_llm (8 tests)
BrowserAgentSession.run_task (8 tests)
BrowserAgentSession.cleanup (1 test)
get_browser_session singleton (5 tests)
browser_do tool (6 tests)
browser_cleanup tool (3 tests)
Browser action tools (22 tests)
Every delegating tool verified for correct task string construction:
web_search tool (1 test)
Edge cases (4 tests)
BROWSER_USE_AVAILABLE guard (2 tests)
Design
__wrapped__async functions directly (bypasses strands@tooldecorator overhead)Config.from_file+get_browser_sessionlevel for action toolsBrowserUseAgent/BrowserProfile/Controller/ChatBedrocklevel for session testsautousefixture resets the global singleton between every testTest results
Baseline: 1158 existing + 75 new = 1233 total passing tests.
Open PRs checked (no overlap)
Checked all 50 open PRs (#134–#183). Closest related:
test/browser_utils) — testsbrowser_utils.py(different module:prepare_evaluate_scripthelper), NOTbrowser_tools.pytest/base-browser-data-agents-suite) — tests agent classes, not the tools moduletest/stream-async-browser-agent) — testsBrowserUseAgent.stream_async, not browser_toolsNo open or merged PR provides dedicated test coverage for
browser_tools.py.