Visitar URL original
docs(testing): update testing-validation.md to reflect actual test frameworks · Issue #144 · microsoft/edge-ai · GitHub
Skip to content

docs(testing): update testing-validation.md to reflect actual test frameworks #144

Open

Description

Summary

The testing documentation (docs/contributing/testing-validation.md) references Terratest (Go-based) with go test examples, but the actual test implementation uses native terraform test with .tftest.hcl files. This discrepancy confuses contributors and misrepresents the testing approach.

Wave 0 — Foundation: This issue must merge before #145 so the test policy document references accurate frameworks.

Background

OSSF Passing Badge Criteria:

Current State:

  • docs/contributing/testing-validation.md (306 lines) references Terratest and go test
  • Actual tests use native terraform test with .tftest.hcl files
  • 15 components have tests following the native terraform test pattern
  • No Go files or Terratest dependencies exist in the repository

Acceptance Criteria

  • Terratest references and go test examples removed from testing-validation.md
  • Native terraform test patterns documented with .tftest.hcl examples
  • Examples reference actual test files from existing components (e.g., 000-resource-group)
  • Vitest documentation for JavaScript testing is current and accurate
  • Rust testing section added or updated (if not present)

Implementation Guidance

Update docs/contributing/testing-validation.md to:

  1. Replace Terratest section with native terraform test section
  2. Include example from src/000-cloud/000-resource-group/terraform/tests/
  3. Document npm run tf-test and npm run tf-test-all commands
  4. Verify JavaScript testing section references vitest correctly
  5. Add or update Rust testing section with cargo test patterns

Reference the actual test files in the repository for accurate examples.

Activity

  1. katriendg commented on Jun 11, 2026

    @katriendg
    Collaborator

    ⚠️ Correction: Terratest/Go is still in active use for blueprint testing — do not remove that guidance

    While auditing PRs #520 and #576 (both addressing this issue), we confirmed that the original premise of this issue is only partially accurate. The statement "No Go files or Terratest dependencies exist in the repository" is incorrect.

    Terratest (Go) is still the active framework for blueprint-level testing. Verified in main:

    • blueprints/full-single-node-cluster/tests/ — full Go/Terratest suite: contract_terraform_test.go, contract_bicep_test.go, deploy_terraform_test.go, deploy_bicep_test.go, validation.go, setup.go, outputs.go, plus go.mod/go.sum
    • blueprints/minimum-single-node-cluster/tests/ and blueprints/only-cloud-single-node-cluster/tests/ — additional Go test files
    • src/900-tools-utilities/904-test-utilities/ — shared Go test helpers (contract.go, deployment.go) depending on github.com/gruntwork-io/terratest v1.0.0
    • gruntwork-io/terratest v1.0.0 is a real declared dependency in all of the above go.mod/go.sum files

    What this means for the scope of this issue

    The migration from Terratest → native terraform test is correct only for component-level tests (src/**/terraform/tests/*.tftest.hcl). It is not correct for blueprints. The blueprint testing documentation is currently accurate and must be preserved.

    Revised guidance — keep vs. change

    Change (component-level only):

    • Replace Terratest / go test examples with native terraform test + .tftest.hcl
    • Reference real component tests (e.g. src/000-cloud/000-resource-group/terraform/tests/)
    • Document npm run tf-test / npm run tf-test-all
    • Add/refresh Rust (cargo test) section
    • Verify the JavaScript testing section is accurate
    • Fix the docs/contributor/ → docs/contributing/ cspell path typo

    Do NOT change / do NOT delete (blueprint-level):

    • Keep the Blueprint Testing section's Go/Terratest content as-is
    • Keep the reference to blueprints/full-single-node-cluster/tests/ as the blueprint test reference implementation
    • Keep references to src/900-tools-utilities/904-test-utilities/ shared Go test utilities
    • Do not re-point the blueprint "reference implementation" link to a component test directory
    • Do not replace blueprint run-contract-tests.sh / run-deployment-tests.sh / go test examples with terraform test

    Updated acceptance criteria

    • Terratest/go test examples removed from the component testing section only
    • Native terraform test patterns documented with .tftest.hcl examples for components
    • Component examples reference actual files (e.g. 000-resource-group)
    • Blueprint testing section retains accurate Go/Terratest guidance (Terratest is still in use for blueprints)
    • JavaScript testing section verified accurate
    • Rust testing section added/updated
  2. katriendg commented on Sep 1, 2026

    @katriendg
    Collaborator

    Thanks for checking. Your interpretation is correct: this is a documentation-only update, not a migration of the blueprint test suites.

    Please proceed with this scope, if you wish to pick up the documentation change:

    • Document native terraform test and .tftest.hcl files for component-level Terraform tests.
    • Use tests as an example.
    • Document npm run tf-test and npm run tf-test-all.
    • Preserve Go/Terratest guidance for blueprint testing, using tests and the shared test utilities.
    • Add practical Rust cargo test guidance.
    • Document JavaScript frameworks by project area: applications use Vitest, while the Docusaurus site uses Jest.
    • Fix the docs/contributor/ path typo.

    Any contextless go test examples elsewhere in the page should be identified explicitly as blueprint tests. No test implementation changes are expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions