Back to all reviewers

Clarify test documentation

hashicorp/terraform
Based on 4 comments
Other

Ensure all testing-related documentation is clear, accurate, and user-focused. Use precise terminology when describing test components, fully explain configuration attributes with their effects, and provide complete examples that demonstrate proper usage.

Testing Other

Reviewer Prompt

Ensure all testing-related documentation is clear, accurate, and user-focused. Use precise terminology when describing test components, fully explain configuration attributes with their effects, and provide complete examples that demonstrate proper usage.

When documenting test blocks and attributes:

  • Use exact parameter names and describe their full behavior
  • Explain default values and all possible options
  • Reference related sections for context

For example:

test "configuration_example" {
  # Document that this enables parallel execution of all run blocks
  # within this test unless specifically overridden
  parallel = true
}

run "validate_resource_properties" {
  # Document that this block contains validation logic
  # with clear explanation of the condition and error message
  condition     = local.resource_name != ""
  error_message = "Resource name cannot be empty"
}

Well-documented tests serve as both validation tools and self-explanatory examples, making your codebase more maintainable and helping new team members understand testing requirements quickly.

4
Comments Analyzed
Other
Primary Language
Testing
Category

Source Discussions