# Generate focused regression tests from changes

> Use AI coding assistants to propose tests based on a precise code diff and known behavior.

Canonical: https://ainextia.com/what-ai-can-do/code-tests/
Publisher: https://ainextia.com/

Audience: Developer
Maturity: Widely accessible
Reviewed: 2026-11-05

## Implementation steps
1. Explain the intended behavior and acceptance criteria.
2. Ask for edge-case tests, including failures and permissions.
3. Run the tests in CI and have a developer inspect results.

## Example prompt
Given this diff and spec, propose tests that would fail on a regression. Do not modify production files.

## Verification
Review whether generated assertions test behavior rather than implementation details.

## Limitations
Passing AI-generated tests does not prove the application is secure.

Source: https://docs.github.com/en/copilot
