Skip to main content

Test Generator Pack

TrustedSandbox optionalv1.0.0MITVerified80

by 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.

langchaincrewaigeneric

Quick Start

bash
agentnode install test-generator-pack

Runs in a subprocess with filtered environment by default. Declared permissions are policy-checked, not sandboxed.

Usage

From package
python
from 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

high confidence80/100✔ Verified
smokeReturned valid result
+25/25
testsTests failed
0/15
importAll tools imported successfully
+15/15
installInstalled in 1.4s
+15/15
contractAll contract checks passed
+10/10
determinismConsistent output across runs (normalized)
+5/5
reliability3/3 runs passed
+10/10

Package installs and imports correctly. runtime checks passed.

install1.4s
import55ms
smoke103ms
tests1.1s

This package was executed and validated by AgentNode before listing. Install, import, and runtime checks passed.

Verified in real_auto mode

Python 3.12.3ffmpegpopplertesseractuv

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

test_generationgenerate_teststool

Permissions

Sandbox optionalFrom a trusted publisher — runs on the host by default. You can require isolation with sandbox.host_trust_policy.

Declared by the publisher. Checked before execution by the policy gate.

Networknone
Filesystemworkspace_write
Code Executionlimited_subprocess
Data Accessinput_only
User Approvalonce

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.

bash
agentnode install test-generator-pack

Files (3)

License

MIT

Stats

Downloads0
Installs0
Versionv1.0.0
Published3/16/2026
Channelstable
Typetoolpack
Entrypointtest_generator_pack.tool

Compatibility

Frameworks

langchaincrewaigeneric

Runtime

python

Python Version

>=3.10

Trust & Security

PublisherTrusted
SignatureNone
ProvenanceNone
Security Issues0

Publisher

A

AgentNode

@agentnode