pytest_testersai
The easiest way to AI-upgrade your existing pytest suite. You already have the tests — this adds AI Checks at the moments that matter, without replacing your framework, runner, or CI pipeline.
analyze_* call, or define your own.Auto-loaded pytest plugin. Adds a testersai fixture.
# Download the bundle from the Downloads page, then:
pip install ./testersai-python-pytest-0.1.0.tar.gz
A complete, runnable Python + pytest example.
# conftest.py auto-loads the plugin — no setup needed.
def test_checkout(page, testersai):
page.goto("/cart")
testersai.screenshot(page.screenshot()) # after nav
page.click("#checkout")
page.fill("#card", "4242424242424242")
page.click("#pay")
r = testersai.screenshot(page.screenshot())
testersai.console([]) # JS errors?
assert page.url.endswith("/success")
# Opt-in strictness — only where it matters:
testersai.assert_clean(r)
Findings appear as pytest report_section entries in the terminal, XML, or HTML report.
If the AI call fails — rate limit, hang, firewall, no network — the SDK gives up
fast and returns a skipped result. Your pytest test is never blocked.
Rule of thumb: wherever a human reviewer would pause to look during a manual run. These recommendations are tuned for pytest — pick the ones that fit your suite.
The page just re-rendered. Ask "does this look right?" before any interaction.
Login, add-to-cart, toggle, submit. The UI just reflected a new state — where regressions hide.
You were about to check one thing. Ask the AI about everything else for free.
API returned, spinner gone, toast shown. Catch broken empty-states and stale data.
A single console + network check at the end of every test catches issues your assertions ignored.
Mobile vs. desktop, light vs. dark, locale change. One call per viewport.
conftest.pyAdd a session-scoped fixture that wraps every page.goto() with a check — zero per-test code.
Add testersai.console([]) in an autouse teardown. JS errors get caught even in tests that don't assert on them.
report_section entries in the terminal, XML, or HTML report.Or grab the monolith ZIP (all languages, all adapters).