A practical starter kit for QA Engineers and SDETs to design repeatable regression testing workflows for AI/LLM applications.
AI applications can change their behavior when prompts, models, retrieval configuration, or application logic changes.
Traditional software regression testing is not always enough for AI-powered applications because the output can vary even when the underlying application code appears unchanged.
This starter kit provides a practical foundation for creating repeatable AI regression tests, evaluating responses, and comparing results before releasing changes.
It is designed as a starting point for QA Engineers, SDETs, and developers working with AI/LLM-based applications.
AI application quality can be affected by changes to:
- Prompts
- LLM models
- Model parameters
- Retrieval configuration
- RAG pipelines
- Application logic
- System instructions
- Evaluation criteria
A change that improves one scenario can unintentionally degrade another.
AI regression testing helps identify these changes before they reach production.
This starter kit includes:
- 10 practical AI regression test scenarios
- CSV-based evaluation dataset
- AI evaluation scorecard
- Python + pytest testing framework
- Promptfoo evaluation example
- GitHub Actions CI workflow
- Automated HTML test reporting
- Customer Support example
- RAG Assistant example
- Prompt Regression example
- Practical AI testing documentation
- Quick-start documentation
- Reusable testing templates
βββββββββββββββββββββββ
β AI Application β
ββββββββββββ¬βββββββββββ
β
βββββββββββββββββββββββ
β Test Dataset β
ββββββββββββ¬βββββββββββ
β
βββββββββββββββββββββββ
β Run Evaluation β
ββββββββββββ¬βββββββββββ
β
βββββββββββββββββββββββ
β Score Responses β
ββββββββββββ¬βββββββββββ
β
βββββββββββββββββββββββ
β Compare Baseline β
ββββββββββββ¬βββββββββββ
β
Regression?
β β
YES NO
β β
Investigate Release
- Create a representative evaluation dataset
- Define expected behavior
- Establish a baseline
- Change the prompt, model, retrieval configuration, or application logic
- Run the same evaluation suite
- Compare current results with the baseline
- Investigate any regressions
- Release only when quality thresholds are satisfied
AI-Regression-Testing-Starter-Kit/
β
βββ .github/
β βββ workflows/
β βββ ci.yml
β
βββ datasets/
β βββ AI regression evaluation datasets
β
βββ docs/
β βββ images/
β β βββ github-actions-runs.png
β β βββ github-actions-success.png
β β βββ html-test-report.png
β βββ AI testing documentation
β
βββ examples/
β βββ customer-support/
β βββ rag-assistant/
β βββ prompt-regression/
β
βββ promptfoo/
β βββ Promptfoo evaluation examples
β
βββ python/
β βββ tests/
β βββ Python regression testing framework
β
βββ templates/
β βββ reusable AI testing templates
β
βββ CHANGELOG.md
βββ README.md
βββ .gitignore
git clone https://github.com/nikhilshendgetech-sudo/AI-Regression-Testing-Starter-Kit.git
cd AI-Regression-Testing-Starter-Kitpython -m venv .venvActivate it on Windows:
.venv\Scripts\activatepip install -r python/requirements.txtpytest python/tests -vpytest python/tests -v --html=reports/ai-regression-report.html --self-contained-htmlThe generated report provides a detailed view of test results, execution duration, and individual regression scenarios.
The starter kit demonstrates different AI testing scenarios.
Validate whether an AI customer-support assistant:
- Provides relevant responses
- Follows expected behavior
- Avoids inappropriate responses
- Maintains consistent output quality
Validate AI responses in a retrieval-augmented generation workflow.
Typical checks include:
- Relevant information retrieval
- Response correctness
- Context-aware answers
- Handling unsupported questions
Compare AI behavior before and after a prompt change.
This helps identify situations where a new prompt improves one use case but causes regressions in another.
The current MVP regression validation suite contains 13 automated tests covering dataset integrity and 10 AI regression scenarios.
| Metric | Result |
|---|---|
| Total Tests | 13 |
| Passed | 13 |
| Failed | 0 |
| Skipped | 0 |
| Regression Scenarios | 10 |
| Execution Time | ~0.4 sec (local) |
| CI Status | Passing β |
| ID | Evaluation Area | Application |
|---|---|---|
| AI-REG-001 | Correctness | Customer Support Assistant |
| AI-REG-002 | Hallucination | Company Policy RAG Assistant |
| AI-REG-003 | Relevance | E-commerce Assistant |
| AI-REG-004 | Consistency | HR Policy Assistant |
| AI-REG-005 | Context Adherence | Documentation Assistant |
| AI-REG-006 | RAG Grounding | Knowledge Base Assistant |
| AI-REG-007 | Prompt Injection | Customer Support RAG Assistant |
| AI-REG-008 | Sensitive Data Protection | HR Assistant |
| AI-REG-009 | Out-of-Scope Handling | Technical Documentation Assistant |
| AI-REG-010 | Regression | Customer Support Assistant |
Note: The current MVP validates regression-test case structure and expectations. It does not yet execute these scenarios against a live LLM or calculate production AI quality scores.
The regression suite is automatically executed through GitHub Actions on every push and pull request.
The CI pipeline generates a self-contained HTML report with individual test results and execution details.
The project includes evaluation datasets and a scorecard approach for tracking AI response quality.
A typical regression evaluation can compare:
Baseline
β
Run Test Dataset
β
Calculate Evaluation Scores
β
Compare With Current Version
β
Identify Quality Changes
Example result categories can include:
| Evaluation Area | Purpose |
|---|---|
| Correctness | Is the response factually appropriate? |
| Relevance | Does the response address the question? |
| Consistency | Does behavior remain stable? |
| Safety | Does the response follow defined safety expectations? |
| Regression | Did quality decrease after a change? |
The repository also includes a Promptfoo-based evaluation example.
Promptfoo can be used to evaluate and compare prompts and LLM outputs across multiple test cases.
The promptfoo/ directory provides an example setup that can be extended for project-specific evaluations.
GitHub Actions is included to automatically execute the regression test suite.
The workflow is located at:
.github/workflows/ci.yml
The CI pipeline helps ensure that changes to the testing framework can be validated automatically.
Developer Change
β
Git Push
β
GitHub Actions
β
Install Dependencies
β
Run Regression Tests
β
Generate HTML Report
β
Upload Report Artifact
β
Test Result
β β
PASS FAIL
β β
Continue Investigate
Each GitHub Actions run generates a self-contained HTML test report and uploads it as a workflow artifact.
Artifact name:
ai-regression-test-report
This allows test results to be inspected after each CI execution without committing generated reports to the repository.
This starter kit is useful for:
- QA Engineers
- SDETs
- Automation Engineers
- AI Application Developers
- LLM Application Teams
- RAG Application Teams
- Teams introducing AI quality gates into CI/CD
Future improvements may include:
- More AI evaluation metrics
- LLM-as-a-Judge evaluation
- Automated baseline comparison
- Quality threshold gates
- Expanded RAG testing scenarios
- Additional CI/CD integrations
- Production-oriented AI test examples
Additional guides and examples are available in:
docs/
examples/
templates/
The goal of this project is to provide a simple and practical starting point for implementing repeatable AI regression testing rather than treating AI testing as a one-time manual activity.
This project is provided for educational and demonstration purposes.

