This document describes how to test the cookiecutter template to ensure all features work correctly.
| Project Type | Python Version | Optional Features | Platform |
|---|---|---|---|
| python_cli | 3.12 | None | Linux |
| python_cli | 3.14 | async, pydantic | Linux |
| python_library | 3.12 | None | Linux |
| c_tricore | N/A | N/A | Linux |
Run the integration test script:
./scripts/test_template.shThis script will:
- Generate projects with different configurations
- Verify file structure
- Run tests in generated projects
- Check documentation builds
- Verify Docker builds
- Clean up test projects
- Generate Python CLI project
- Generate Python Library project
- Generate C/TriCore project
- Verify all files are created
- Check cookiecutter variable substitution
uvx --python 3.14 cookiecutter . --no-input project_type=python_cli
cd my_project- Virtual environment created (
.venv/) - Dependencies installed
- Pre-commit hooks installed
- Git repository initialized
Run Commands:
-
just test- All tests pass -
just lint- No linting errors -
just typecheck- No type errors -
just format- Code formatted -
just docs-serve- Documentation serves -
just docs-build- Documentation builds -
just ci- All CI checks pass -
just docker-build- Docker image builds -
just docker-run- Container runs
CLI Commands:
-
uv run my_project --help- Shows help -
uv run my_project init test- Creates directory -
uv run my_project run "hello"- Processes input -
uv run my_project config- Shows configuration
Git Operations:
- Make a change
-
git add . -
git commit- Pre-commit hooks run - Commit message template appears
VS Code:
- Open in VS Code
- Extensions recommended
- Tasks available (Ctrl+Shift+B)
- Debugging works (F5)
uvx --python 3.14 cookiecutter . --no-input project_type=python_library
cd my_library-
just test- Tests pass -
just lint- No errors -
just docs-serve- Documentation works - Import library:
uv run python -c "import my_library"
uvx --python 3.14 cookiecutter . --no-input project_type=c_tricore
cd my_tricore_projectNote: Requires HighTec GCC toolchain installed
-
just build- Project builds (if toolchain available) -
just misra- MISRA check runs -
just docs-serve- Documentation works - Verify file structure:
-
src/*.candsrc/*.hexist -
startup/directory exists -
linker/tc375_link.ldexists -
SConstructexists
-
Async Support:
uvx --python 3.14 cookiecutter . --no-input use_async=yes- Async code present in generated project
- pytest-asyncio installed
- Tests pass
Pydantic Support:
uvx --python 3.14 cookiecutter . --no-input use_pydantic=yes- Pydantic installed
- Validation examples present
Devcontainer:
uvx --python 3.14 cookiecutter . --no-input use_devcontainer=yes-
.devcontainer/devcontainer.jsonexists - Can open in VS Code Remote Containers
Push generated project to GitHub and verify:
- Test workflow runs
- Linting workflow runs
- Pre-commit workflow runs
- Documentation deploys to GitHub Pages
- Docker workflow builds image
- Dependabot creates PRs
- CodeQL scans code
- All documentation pages render correctly
- API documentation auto-generates
- Mermaid diagrams render
- Search works
- Navigation works
- Mobile responsive
- Coverage report generates
- HTML report viewable
- Coverage meets threshold (>80%)
- Coverage badge in README
-
docker build -t test .- Builds successfully -
docker run test- Runs correctly -
docker-compose up- Services start - Image size reasonable (<500MB)
Windows (WSL2):
- Template generates
-
scripts/setup_windows.ps1installs just - All commands work
macOS:
- Template generates
- All commands work
Linux:
- Template generates
- All commands work
Solution: Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
Solution: Run scripts/setup_windows.ps1 (Windows) or install just
Solution: Run just format to auto-fix issues
Solution: Check test output, verify dependencies installed
Solution: Check Dockerfile, verify base image available
Expected performance:
- Template generation: <5 seconds
- Dependency installation: <30 seconds
- Test suite: <10 seconds
- Documentation build: <5 seconds
- Docker build: <2 minutes
After template changes:
- Run full test suite
- Generate all project types
- Verify no breaking changes
- Update version if needed
- Update CHANGELOG.md
The template itself should be tested:
- Cookiecutter JSON validates
- Jinja2 templates render
- Hooks execute without errors
- Generated projects pass CI
Template is ready for release when:
- ✅ All project types generate successfully
- ✅ All tests pass in generated projects
- ✅ Documentation builds and deploys
- ✅ Docker images build and run
- ✅ CI/CD pipelines work
- ✅ Cross-platform compatibility verified
- ✅ No critical bugs or issues
If you find issues during testing:
- Note the exact steps to reproduce
- Include error messages
- Specify platform and versions
- Open an issue on GitHub
- Tag with
bugortestinglabel
Document test results:
Date: YYYY-MM-DD
Tester: Name
Platform: OS/Version
Python: Version
Results:
- Python CLI: ✅ Pass
- Python Library: ✅ Pass
- C/TriCore: ✅ Pass
- Docker: ✅ Pass
- Documentation: ✅ Pass
- CI/CD: ✅ Pass
Issues Found: None
Notes: All tests passed successfully