Skip to content

Feature/ai test generator#421

Open
kbo001 wants to merge 11 commits intomasterfrom
feature/ai-test-generator
Open

Feature/ai test generator#421
kbo001 wants to merge 11 commits intomasterfrom
feature/ai-test-generator

Conversation

@kbo001
Copy link
Copy Markdown
Collaborator

@kbo001 kbo001 commented Mar 24, 2026

No description provided.

kbo001 and others added 11 commits March 24, 2026 15:27
Adds an AI-powered test generator that lets non-technical team members
describe a test in plain English and automatically produce a ready-to-run
pytest file using the existing POM framework and page objects.

Files added:
- ai_test_generator/scanner.py     - scans all 16 suites for page objects/methods
- ai_test_generator/generate_test.py - CLI + Claude API integration
- ai_test_generator/__init__.py
- ai_test_generator/requirements.txt
- .github/workflows/ai-test-generator.yml - GitHub Actions UI trigger

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Team members can now write test steps in plain English inside
ai_testcases/*.txt files in any suite folder. Pushing the file
automatically triggers the AI generator and commits the .py test back.

- ai_test_generator/process_testcases.py  - scans all ai_testcases/ folders
- ai_test_generator/TESTCASE_TEMPLATE.txt - template for team members
- Features/CaseSearch/ai_testcases/       - example for CaseSearch suite
- Updated GitHub Actions workflow to trigger on txt file push

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Workflow now processes every changed txt file in a push
- Commits all generated .py files in a single commit
- Artifact upload captures all generated tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Team members can now write multiple test cases in a single txt file.
Each txt file generates one .py module with test_01_, test_02_... functions,
matching the existing framework structure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ai_test_generator/README.md: full guide for team members
- HQSmokeTests/ai_testcases/reports_and_users.txt: real example with 5 tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix Windows encoding issue in process_testcases.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Scanner now extracts __init__ args per class and surfaces them
as 'INSTANTIATE AS: ClassName(arg1, arg2)' in the AI context.
System prompt rule added to enforce exact constructor usage.
No more TypeError from wrong number of arguments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Team members can now add 'Tags: report, smoke' to each test block.
Tags are applied as @pytest.mark decorators in the generated test file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant