Test Generator Pack
★Trusted◇Sandbox optionalv1.0.0MIT✔Verified80by AgentNode · published 5 months ago · toolpack
Generate unit and integration tests for your codebase.
Auto-generate test cases using pytest, Jest, Vitest, or Go testing. Covers edge cases, error paths, and happy paths with configurable coverage targets.
Quick Start
agentnode install test-generator-packRuns in a subprocess with filtered environment by default. Declared permissions are policy-checked, not sandboxed.
Usage
From packagefrom test_generator_pack.tool import run
result = run(
source_code="""
def calculate_discount(price: float, tier: str) -> float:
rates = {"bronze": 0.05, "silver": 0.10, "gold": 0.15, "platinum": 0.20}
if price < 0:
raise ValueError("Price cannot be negative")
rate = rates.get(tier, 0.0)
return round(price * (1 - rate), 2)
""",
framework="pytest",
include_edge_cases=True
)
print(result["test_code"])
# import pytest
# from module import calculate_discount
#
# def test_gold_tier_discount():
# assert calculate_discount(100.00, "gold") == 85.00
#
# def test_unknown_tier_no_discount():
# assert calculate_discount(50.00, "unknown") == 50.00
#
# def test_negative_price_raises():
# with pytest.raises(ValueError):
# calculate_discount(-10.00, "silver")
#
# def test_zero_price():
# assert calculate_discount(0.0, "platinum") == 0.0
print(f"Generated {result['test_count']} tests")
print(f"Coverage targets: {result['coverage_targets']}")Runs locally on your machine. No execution data is sent to AgentNode. Permissions are checked before execution. Learn how this works
Verification
Package installs and imports correctly. runtime checks passed.
This package was executed and validated by AgentNode before listing. Install, import, and runtime checks passed.
Verified in real_auto mode
Last verified 28d ago· Runner v2.0.0
Use this when you need to...
- ›Generate pytest unit tests for a Python FastAPI router
- ›Create Jest integration tests for React components
- ›Scaffold Go table-driven tests from function signatures
- ›Auto-generate edge case tests for input validation logic
- ›Build test suites with mocking for external API dependencies
README
Version History
Capabilities
Permissions
Declared by the publisher. Checked before execution by the policy gate.
Permissions are policy-checked before execution. For trusted and curated packages that run on the host, network and filesystem access are policy-checked but not OS-sandboxed. When runtime isolation is required for untrusted/community code, AgentNode uses sandbox-or-fail-closed if the required container runtime and pinned image are available. Learn more
Privacy
All tool execution happens locally on your machine. AgentNode never receives:
- • Tool inputs or outputs
- • Execution logs
- • Data your agent processes
Only install events and search queries are sent to the registry.
agentnode install test-generator-packFiles (3)
License
MITStats
Compatibility
Frameworks
Runtime
pythonPython Version
>=3.10Trust & Security
Publisher
AgentNode
@agentnode