A demonstration repository showcasing CloudBees Smart Tests predictive test selection capabilities with a Python application and pytest test suite.
Ready to see Smart Tests in action? Start with QUICKSTART GUIDE! 🚀
This repository contains a fully functional Issue Tracker application built with FastAPI, complete with 140+ tests (unit, integration, and E2E) that demonstrate how Smart Tests uses AI to intelligently predict and select only the relevant tests based on code changes, reducing CI execution time by 50% or more.
- AI-Powered Test Selection: Smart Tests analyzes code changes and predicts which tests are affected
- Observation Mode: All tests run while Smart Tests validates prediction accuracy in the UI
- Multi-Suite Support: Unit, integration, and E2E tests all integrated with Smart Tests
- CI/CD Integration: GitHub Actions workflows with complete Smart Tests integration
- Demo Patches: Pre-built code changes that simulate real development scenarios with test failures
Choose your path based on what you want to do:
🎬 I Want to Run the Smart Tests Demo
→ QUICKSTART.md - Complete step-by-step guide to:
- Fork the repository and set up Smart Tests
- Run baseline tests and view results in CloudBees
- Apply demo patches that break tests
- See how Smart Tests predicts which tests will fail
- Analyze prediction accuracy and time savings
Time Required: 15-20 minutes Prerequisites: GitHub account, CloudBees account (free tier)
🔧 I Want to Run the Application Locally
→ TECHNICAL_REFERENCE.md - Section 7: Local Development Setup
Quick commands:
# Clone and setup
python -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
# Initialize database
make db-init && make migrate && make seed
# Run application
make runApplication runs at: http://localhost:8000
📚 I Want Complete Technical Documentation
→ TECHNICAL_REFERENCE.md - Comprehensive reference covering:
- Application Specifications (tech stack, dependencies, configuration)
- Database Schema and Models (all 6 models documented)
- API Endpoints (complete endpoint inventory)
- Testing Architecture (140+ tests, fixtures, configuration)
- GitHub Actions and CI/CD (workflow specifications)
- Smart Tests Integration (complete workflow documentation)
- Local Development Setup (step-by-step guide)
- Docker Deployment (containerization guide)
- Code Quality and Standards (formatting, linting, style)
- Project Structure (directory tree, architecture)
🧪 I Want to Understand the Test Suite
→ TECHNICAL_REFERENCE.md - Section 4: Testing Architecture
Test organization:
- Unit Tests: 6 files testing services
- Integration Tests: 5 files testing API endpoints
- E2E Tests: 3 files with Playwright browser automation
Run tests:
make test # Unit + integration
make test-e2e # End-to-end tests
make test-all # All tests🔬 I Want to Understand Smart Tests Integration
→ TECHNICAL_REFERENCE.md - Section 6: Smart Tests Integration
Learn about:
- How Smart Tests CLI integrates with pytest
- The 6-step workflow (record build → create subset → run tests → record results)
- Observation mode vs production mode
- JUnit XML configuration
- Viewing results in CloudBees platform
🎨 I Want to Create New Demo Patches
→ patches/CREATING_NEW_PATCHES.md - Complete guide including:
- What makes a good demo patch
- Step-by-step patch creation process
- Testing and validation
- 6+ example patch ideas
→ patches/AI_PATCH_GENERATION_PROMPT.txt - Ready-to-use AI prompt for generating patches with Claude/ChatGPT
→ patches/README.md - Documentation of existing patches
🔄 I Want to Understand the CI/CD Workflows
→ TECHNICAL_REFERENCE.md - Section 5: GitHub Actions and CI/CD
GitHub Actions workflows:
- Tests Workflow: Runs unit, integration, and E2E tests with Smart Tests
- Apply Demo Patch Workflow: Applies breaking changes to demonstrate CI behavior
Both workflows fully documented with step-by-step breakdowns.