Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 1, 2025

This PR addresses the need for better documentation of the template testing infrastructure in the templates/tests/ directory, as requested in issue #279.

Changes Made

Created templates/tests/README.md

  • Comprehensive overview of the template testing system and its end-to-end testing workflow
  • Detailed documentation for both test-templates.sh and delete-test-templates.sh scripts
  • Usage examples covering common scenarios:
    • Testing single templates vs all templates
    • Custom branches and environments
    • Test-only mode (skip deployment)
    • Cleanup operations
  • Complete parameter reference tables for both scripts with descriptions and defaults
  • Prerequisites and troubleshooting guidance including Azure CLI setup, Playwright configuration, and debug modes
  • CI/CD integration notes for DevContainer environments
  • Contributing guidelines for adding tests to new templates

Updated docs/CONTRIBUTING.templates.md

  • Added new "Automated Testing" section alongside existing manual testing guidance
  • Quick-start examples for running template tests
  • Configuration overview highlighting key testing features (parallel execution, Playwright validation, cleanup automation)
  • Cross-references to the detailed documentation in templates/tests/README.md
  • Prerequisites and best practices for automated testing

Key Features Documented

The documentation covers the full testing workflow:

  1. Template initialization using azd init
  2. Infrastructure provisioning with azd provision
  3. Application deployment via azd deploy
  4. Playwright smoke test validation against deployed endpoints
  5. Automatic cleanup of Azure resources and local files

The scripts support advanced features like parallel deployment for efficiency, customizable test configuration, and comprehensive error handling.

Validation

  • ✅ Spell-checked using repository cspell configuration
  • ✅ Markdown formatting validated
  • ✅ All referenced file paths verified to exist
  • ✅ Script functionality accurately documented based on source code analysis

This documentation will help contributors understand how to run and work with the existing template testing infrastructure without needing to reverse-engineer the bash scripts.

Fixes #279.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Add template test info to docs Add comprehensive template testing documentation Jul 1, 2025
@Copilot Copilot AI requested a review from kristenwomack July 1, 2025 23:21
Copilot finished work on behalf of kristenwomack July 1, 2025 23:21
@kristenwomack kristenwomack reopened this Aug 18, 2025
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.

Add template test info to docs
2 participants