Internal command-line tool (CLI) to help the QA team manage their work, especially during the transition to test automation.
With the QA Agent you can manage test cases, follow the team roadmap, keep a change history, search and create Pull Requests, run Playwright tests and ask an AI assistant questions about your project, all from the terminal.
Developed at Runtime Revolution.
- Requirements
- Installation
- Configuration
- Interactive Menu
- Commands
- AI Features
- Check Installation (doctor)
- Project Structure
- Contributing
- Important Notes
- Changelog
| Requirement | Needed for |
|---|---|
| Python 3.10 or newer | Everything |
| Git | Everything |
GitHub CLI (gh), logged in |
Pull Request features |
| Ollama | AI features (optional) |
The QA Agent works on macOS and Windows.
1. Clone the project:
git clone https://github.com/runtimerevolution/qa-agent.git
cd qa-agent2. Create and activate the virtual environment:
macOS / Linux:
python3 -m venv venv
source venv/bin/activateWindows:
python -m venv venv
venv\Scripts\activate3. Install the dependencies:
pip install click questionaryFor the AI features, also install:
pip install ollama4. Create your configuration file:
macOS / Linux:
cp config.example.json config.jsonWindows:
copy config.example.json config.jsonThen open config.json and fill in the values for your project (see Configuration).
5. Check that everything is ready:
python -m agent.cli doctorThe doctor command tells you if anything is missing and how to fix it.
Each person has their own config.json file, with the settings for their project and their computer. It is never shared through Git, so you can change it freely without affecting anyone else.
The file config.example.json is the template: copy it to create your own.
| Field | What it does | Example |
|---|---|---|
project |
Name of the project you are testing | "Team Allocator" |
platform |
Git platform used by the project | "GitHub" |
available_platforms |
Platforms shown in the menu | ["GitHub", "GitLab", "Bitbucket"] |
base_branch |
Main branch of the project | "main" |
ai_enabled |
Turns the AI features on or off | true |
ai_cache_enabled |
Saves AI answers to reuse them (see Saved answers) | true |
ai_provider |
Which AI provider to use | "ollama" |
ai_models |
The model to use for each provider | see below |
Example of the AI section:
"ai_enabled": true,
"ai_cache_enabled": true,
"ai_provider": "ollama",
"ai_models": {
"ollama": "llama3.2",
"claude": "claude-sonnet-5",
"openai": ""
}config.jsonis listed in.gitignoreand is not tracked by Git.- The configuration is read by
load_config()inagent/cli.py. If the file is missing or broken, safe default values are used, so the tool never crashes because of it. Rundoctorto find out if your file has a formatting error. - The AI settings are read through
get_ai_settings(), which returns whether the AI is on, the provider and the model for that provider. Older config files with a singleai_modelfield still work, but it is recommended to update to the structure above. - API keys are never stored in
config.json. See AI providers.
The easiest way to use the QA Agent. Instead of typing commands, you choose options from a menu.
python agent/menu.pyNavigate with the arrow keys and press Enter to select an option.
| Menu | Options |
|---|---|
| π Test Cases | |
| πΊοΈ Roadmap | View, add item, move item, mark as completed, remove item |
| π History | View history, export history |
| π€ Ask AI | Ask a question, ask again (ignoring saved answers), clear saved answers |
| π Pull Requests | Choose the platform, then view, search or create Pull Requests |
| π©Ί Check Installation | Checks that everything the QA Agent needs is installed and configured |
| β Exit | Exits the menu |
Go to π Pull Requests β GitHub β β Create Pull Request and follow the steps:
- Write the PR title.
- Fill in the description. The PR template opens already filled in. Press Option + Enter (Mac) or Alt + Enter (Windows) when finished.
- Confirm the creation.
- If you have uncommitted changes, choose which files to include: move with the arrow keys, select with Space, and confirm with Enter. Only the selected files are included in the PR.
You need to be on a feature branch, not on main. GitLab and Bitbucket are prepared but not available yet.
All the menu options are also available as commands. They are useful if you prefer typing, or want to use the QA Agent in scripts.
python -m agent.cli <command>To see all commands and their help:
python -m agent.cli --help| Command | What it does |
|---|---|
list-tests |
Lists all test cases. Add --json for a machine-readable list (used by the menu) |
show TC-001 |
Shows the details and steps of a test case |
add-test |
Adds a new test case, step by step |
update-test TC-001 |
Updates the title, area, assignee or Playwright file of a test case |
update-state TC-001 Passed |
Changes the state of a test case |
assign TC-001 |
Assigns a test case to a team member |
delete-test TC-001 |
Deletes a test case, after confirmation |
search |
Searches test cases (see options below) |
stats |
Shows statistics by state |
export-tests-history |
Exports the test cases list to knowledge_base/test_cases_history.md |
Available states: Active Passed Failed Blocked In Progress
Search options:
python -m agent.cli search --keyword login
python -m agent.cli search --assignee Diogo
python -m agent.cli search --area Project/Login
python -m agent.cli search --state Failed
python -m agent.cli run-tests --id TC-001 --id TC-003 # run specific test cases| Command | What it does |
|---|---|
roadmap |
Shows the team roadmap |
roadmap-add todo "Item" |
Adds an item to a section |
roadmap-move "Item" inprogress |
Moves an item to another section |
roadmap-complete "Item" |
Marks an item as completed |
roadmap-remove "Item" |
Removes an item, after confirmation |
Available sections: inprogress todo backlog
| Command | What it does |
|---|---|
history |
Shows the change history |
export-history |
Exports the history to knowledge_base/history.md |
Every change to a test case is recorded automatically.
| Command | What it does |
|---|---|
run-test TC-001 |
Runs the Playwright test linked to one test case and updates its state |
run-tests |
Runs the Playwright tests of all test cases that match the filters (see below) |
Add --simulate to any of them to simulate the run without opening a browser (demo mode).
A test case needs a playwright_file linked to it to be run. You can add one with update-test.
A suite is a named group of tests that you define once and run whenever you need, for example the most important tests to run before every release.
| Command | What it does |
|---|---|
suites |
Lists the saved suites |
run-suite smoke |
Runs all the tests in a suite. Add --simulate for demo mode |
suite-save smoke --id TC-001 --id TC-002 -d "Description" |
Creates a suite, or replaces it if it already exists |
suite-delete smoke |
Deletes a suite (the test cases themselves are not deleted) |
Suites are shared with the whole team through Git, so everyone runs the same tests.
In the menu: π Test Cases β π¦ Test Suites. To edit a suite, choose β Create or Edit a Suite and type its name: its tests appear already selected.
Technical notes
- Suites are stored in
knowledge_base/suites/suites.json, which is tracked by Git. - Suite names are saved in lowercase, with spaces replaced by dashes (
My Suiteβmy-suite). suite-saverefuses test case IDs that do not exist, so broken suites are not saved.run-suitereads the suite and callsrun-tests --id ..., so it gets the same list, confirmation, skipped tests and summary.- If
suites.jsonhas a formatting error, the commands stop with an error instead of ignoring it, so existing suites are never overwritten by mistake. suites --jsonreturns the suites as JSON, used by the menu.
Running multiple tests
run-tests uses the same filters as search, and they can be combined:
python -m agent.cli run-tests --state Failed # run the tests that failed again
python -m agent.cli run-tests --area Project/Login # run all tests from an area
python -m agent.cli run-tests --assignee Diogo # run all tests assigned to someone
python -m agent.cli run-tests --keyword checkout # run all tests matching a keyword
python -m agent.cli run-tests --area Login --state FailedBefore running, it shows which tests will run and which will be skipped because they have no Playwright test linked, and asks for confirmation. Without filters, it runs all tests, and the confirmation defaults to "no". At the end, it shows a summary and updates the state of each test case.
In the menu: π Test Cases β π§ͺ Run Multiple Tests. Choose βοΈ Choose from a list to pick the tests one by one. Test cases without a Playwright test are shown but cannot be selected.
Technical notes
- The filters live in
filter_test_cases()and the test execution inexecute_test(), both inagent/cli.py. They are shared bysearch,run-testandrun-tests. - Tests run one at a time, so the result of each test case is known. Each run calls pytest with
sys.executable, so the Python from the virtual environment is always used.
python -m agent.cli search-prs --state open
python -m agent.cli search-prs --title login
python -m agent.cli search-prs --author username
python -m agent.cli search-prs --reviewer usernameAvailable states: open closed merged all
| Command | What it does |
|---|---|
ask "Your question" |
Asks the AI a question about your project |
ask "Your question" --no-cache |
Asks the AI again, ignoring the saved answer |
generate-test |
Generates a test case with AI, step by step |
clear-cache |
Deletes all saved AI answers |
| Command | What it does |
|---|---|
doctor |
Checks that everything the QA Agent needs is installed and configured |
The QA Agent can use AI in two ways:
- Ask questions about your project. The AI reads the test cases, the roadmap and the guidelines before answering, so its answers are always about your project.
- Generate test cases from a short description of a feature.
The AI is optional. Everything else in the QA Agent works without it. If your computer feels slow with the AI running, or you don't need it, you can simply turn it off.
Examples:
python -m agent.cli ask "What should I test next?"
python -m agent.cli ask "What test cases do we have for the Login module?"
python -m agent.cli ask "What are the team guidelines for automation?"In your config.json:
"ai_enabled": falseWith the AI off, the AI commands explain how to turn it back on, and everything else keeps working normally.
Ollama runs the AI locally, on your own computer. Your data never leaves the company, and it is free.
1. Install Ollama from ollama.com.
2. Start the Ollama server and keep this terminal open while using the AI:
ollama serve3. Download the model set in your config.json:
ollama pull llama3.24. Install the Python library:
pip install ollamaTip: if your computer is less powerful, you can choose a smaller model in ai_models.
| Provider | Status | Requirement |
|---|---|---|
ollama |
β Available | Ollama installed and running |
claude |
π Coming soon | Anthropic API key |
openai |
π Coming soon | OpenAI API key |
To change the provider, change ai_provider in your config.json. The model for that provider is taken from ai_models automatically.
β οΈ Privacy: with Ollama, everything stays on your computer. With Claude or OpenAI, your questions and project information (test cases, roadmap, guidelines) are sent to an external service.
When you ask a question, the answer is saved on your computer. If you ask the same question again, the saved answer appears instantly (marked with πΎ), without running the AI again.
- If the test cases, roadmap or guidelines change, the AI is asked again automatically, so answers are never out of date.
- If you change the provider or the model, the AI is asked again too.
- Only
askuses saved answers.generate-testalways creates a new suggestion.
To control it:
- Get a fresh answer:
ask "Your question" --no-cache, or π Ask Again in the menu - Delete all saved answers:
clear-cache, or π§Ή Clear Saved Answers in the menu - Turn it off:
"ai_cache_enabled": falseinconfig.json
- All AI calls go through a single function,
ask_ai()inagent/cli.py. Commands do not know which provider is configured. Activating a new provider only requires filling in its block inask_ai(). - API keys will be read from environment variables (
ANTHROPIC_API_KEYandOPENAI_API_KEY), never fromconfig.json. - The cache lives in
agent/ai_cache.pyand is saved in.ai_cache.json, next toconfig.json. The file is in.gitignore, so each person keeps their own answers. - Each answer is stored under a SHA-256 key built from the provider, the model and the full prompt (including the Knowledge Base content). Any change to these produces a different key, which is how outdated answers are avoided.
- Errors from the AI are never saved in the cache.
Checks that everything the QA Agent needs is installed and configured on your computer, and tells you how to fix anything that is missing. Run it right after installing the QA Agent, or whenever something is not working as expected.
python -m agent.cli doctorIt is also available in the interactive menu under π©Ί Check Installation.
| Icon | Meaning |
|---|---|
| β | Everything is fine |
| The QA Agent works, but some features are limited | |
| β | Must be fixed before the QA Agent can work |
| Check | If it fails |
|---|---|
| Python version (3.10 or newer) | β The QA Agent cannot run |
config.json exists and is valid |
β The QA Agent cannot read its settings |
| Git is installed | β Branch and PR features cannot work |
| GitHub CLI is installed and logged in | |
| AI is ready (for Ollama: installed, running and model downloaded) |
If the AI is turned off in config.json, the AI check shows β
, since this is a choice and not a problem.
- All checks live in
agent/doctor.py. Each check is a small function that returns a status (ok,warningorerror) and a message. - Installed programs are detected with
shutil.which, and commands are run withsubprocessusing a 10-second timeout, so the checks work the same way on macOS and Windows. - The AI check receives the settings already read by
get_ai_settings()inagent/cli.py, so the configuration is read in a single place. - To add a new check, write a new function in
agent/doctor.pyand add it to the list inrun_doctor().
qa-agent/ βββ .github/ β βββ pull_request_template.md β template used for every PR β βββ workflows/ β βββ tests.yml β runs the tests on every PR βββ agent/ β βββ cli.py β all commands β βββ menu.py β interactive menu β βββ doctor.py β installation checks β βββ ai_cache.py β saved AI answers βββ knowledge_base/ β βββ test_cases/ β β βββ test_cases.json β test cases database β βββ roadmap/ β β βββ roadmap.md β team roadmap β βββ guidelines/ β β βββ guidelines.md β QA best practices β βββ suites/ β β βββ suites.json β saved test suites (shared with the team) β βββ history.json β change history (internal use) β βββ history.md β exported change history β βββ test_cases_history.md β exported test cases list βββ qa_agent_tests/ β automated tests of the QA Agent itself β βββ conftest.py β shared setup (temporary Knowledge Base) β βββ test_filters.py β tests for the test case filters β βββ test_commands.py β tests for the CLI commands β βββ test_smoke.py β checks that the CLI, every command and the menu start βββ tests/ β Playwright test files of the project being tested βββ config.example.json β configuration template βββ config.json β your configuration (personal, not in Git) βββ pytest.ini β pytest settings βββ .ai_cache.json β your saved AI answers (personal, not in Git) βββ venv/ β virtual environment (personal, not in Git)
- Test cases and history are stored in JSON, because the code reads and changes them. The roadmap and guidelines are stored in Markdown, because people read and edit them.
- All files are read and written as UTF-8, so accents and emojis work the same way on macOS and Windows.
- Git and GitHub CLI are called through
subprocess, which keeps the tool light and avoids extra libraries.
- One PR per change. Create the branch before writing any code.
- Branch names start with the type of change:
feature/for new featuresfix/for bug fixesdocs/for documentation only
- Nothing hardcoded. Anything that changes between projects goes in
config.json(and inconfig.example.jsonas a template). - Code and documentation in English.
- Fill in the PR template, including how to test the change.
- Run the tests with
python -m pytestbefore opening the PR, and test your change on the menu.
The QA Agent has automated tests that check the tool itself: that the filters find the right test cases, that commands change the files correctly, and that every command and the menu start without errors.
They run automatically on every Pull Request, on Linux, Windows and macOS. The PR shows β if they pass, or β with the details if something is broken.
To run them on your computer:
python -m pytestAdd -v to see the name of each test.
- The tests live in
qa_agent_tests/, separate fromtests/, which holds the Playwright tests of the project being tested.pytest.inimakespytestlook only inqa_agent_tests/. test_filters.pytestsfilter_test_cases()with sample data.test_commands.pyruns the commands with Click'sCliRunner. Thekbfixture inconftest.pycreates a temporary Knowledge Base for each test, so the real files are never changed.test_smoke.pyruns the CLI as a separate program, the same way the menu does, and checks that every command shows its help. New commands are tested automatically.- When fixing a bug, add a test that reproduces it, so it cannot come back.
- The GitHub Actions workflow is in
.github/workflows/tests.yml. It runs on Linux, Windows and macOS, with Python 3.10 (the minimum supported version) and 3.14.
- Always activate the virtual environment before using the tool.
- Never delete a test case that was already used: change its state to
Blockedif it no longer applies. - Update the roadmap whenever a step is completed.
- Never share your
config.json,.ai_cache.jsonorvenv/folder, and never push them to Git.
- (2026-11-11)
- Automated tests for the QA Agent, with pytest
- Tests run automatically on every PR, on Linux, Windows and macOS
- (2026-11-04)
- Test suites:
suites,run-suite,suite-saveandsuite-delete - New π¦ Test Suites submenu in π Test Cases
- Test suites:
- 2026-10-26
run-testscan run specific test cases with--id- New βοΈ Choose from a list option in π§ͺ Run Multiple Tests
list-tests --jsonreturns the test cases in JSON
- 2026-10-20
- New
run-testscommand to run several tests at once, using filters - New π§ͺ Run Multiple Tests option in the Test Cases menu
run-testnow always uses the Python from the virtual environment
- New
- 2026-10-20
- New
doctorcommand to check the installation - AI can be turned on or off, and each provider has its own model
- Saved answers (cache) for
ask, with--no-cacheandclear-cache - New π€ Ask AI submenu
- Choose which files to include when creating a PR from the menu
- Windows compatibility: screen clearing and UTF-8 files
config.jsonis no longer tracked by Git
- New
- 2026-06-30 β Initial project setup