
Run Acceptance Tests
- 2.6k installs
- 781 repo stars
- Updated August 4, 2026
- hashicorp/agent-skills
run-acceptance-tests explains how to execute and debug Terraform provider TestAcc Go tests with TF_ACC.
About
The run-acceptance-tests skill guides running Terraform provider acceptance tests, which are Go functions prefixed TestAcc. To run a focused test such as TestAccFeatureHappyPath, execute go test -run=TestAccFeatureHappyPath with environment variable TF_ACC=1 set, defaulting to non-verbose output. Additional provider-specific environment variables may be required; when test output indicates missing variables, suggest secure setup steps rather than embedding secrets. Diagnosis escalates cumulatively: rerun with -count=1 to bypass cached results, add -v for verbose output, set TF_LOG=debug for debug logging, and TF_ACC_WORKING_DIR_PERSIST=1 to keep the Terraform workspace for inspection. A passing test may be a false negative; flip testing validates TestCheckFuncs by editing an expected value in a TestStep, expecting failure, then undoing on success. The skill targets HashiCorp Terraform provider maintainers validating infrastructure resources against real APIs during development and CI, emphasizing secure credential guidance when providers demand cloud or service tokens.
- Acceptance tests are Go functions with TestAcc prefix.
- Run go test -run=TestAccName with TF_ACC=1 environment set.
- Escalate diagnosis: -count=1, -v, TF_LOG=debug, TF_ACC_WORKING_DIR_PERSIST.
- Suggest secure env var setup when providers require missing credentials.
- Flip test edits a TestCheckFunc to detect false-negative passes.
Run Acceptance Tests by the numbers
- 2,573 all-time installs (skills.sh)
- +103 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #337 of 2,153 Testing & QA skills by installs in the Skillselion catalog
- Security screen: CRITICAL risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
run-acceptance-tests capabilities & compatibility
- Capabilities
- focused testacc go test invocation · cumulative debug flag escalation · secure missing env var guidance · flip test false negative detection
- Works with
- terraform
- Use cases
- testing · devops · ci cd
- Platforms
- macOS · Linux · Windows · WSL
- Runs
- Runs locally
- Pricing
- Free
What run-acceptance-tests says it does
A passing acceptance test may be a false negative.
npx skills add https://github.com/hashicorp/agent-skills --skill run-acceptance-testsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2.6k |
|---|---|
| repo stars | ★ 781 |
| Security audit | 2 / 3 scanners passed |
| Last updated | August 4, 2026 |
| Repository | hashicorp/agent-skills ↗ |
How do I run a single Terraform provider acceptance test and debug failures?
Run focused Terraform provider TestAcc acceptance tests with TF_ACC and layered debug options.
Who is it for?
Terraform provider contributors running TestAcc suites locally or in CI.
Skip if: Skip for unit tests without TestAcc prefix or non-Go Terraform module tests.
When should I use this skill?
User asks to run acceptance tests or a TestAcc-prefixed Go test for a provider.
What you get
A focused go test run with correct TF_ACC env and optional debug flags or successful flip validation.
- TestAcc execution command
- Required env var checklist
By the numbers
- Skill metadata version 0.0.1
- Acceptance tests use Go function prefix TestAcc
Files
An acceptance test is a Go test function with the prefix TestAcc.
To run a focussed acceptance test named TestAccFeatureHappyPath:
1. Run go test -run=TestAccFeatureHappyPath with the following environment variables:
TF_ACC=1
Default to non-verbose test output. 1. The acceptance tests may require additional environment variables for specific providers. If the test output indicates missing environment variables, then suggest how to set up these environment variables securely.
To diagnose a failing acceptance test, use these options, in order. These options are cumulative: each option includes all the options above it.
1. Run the test again. Use the -count=1 option to ensure that go test does not use a cached result. 1. Offer verbose go test output. Use the -v option. 1. Offer debug-level logging. Enable debug-level logging with the environment variable TF_LOG=debug. 1. Offer to persist the acceptance test's Terraform workspace. Enable persistance with the environment variable TF_ACC_WORKING_DIR_PERSIST=1.
A passing acceptance test may be a false negative. To "flip" a passing acceptance test named TestAccFeatureHappyPath:
1. Edit the value of one of the TestCheckFuncs in one of the TestSteps in the TestCase. 1. Run the acceptance test. Expect the test to fail. 1. If the test fails, then undo the edit and report a successful flip. Else, keep the edit and report an unsuccessful flip.
Related skills
Forks & variants (1)
Run Acceptance Tests has 1 known copy in the catalog totaling 28 installs. They canonicalize to this original listing.
- hashicorp - 28 installs
How it compares
Use run-acceptance-tests for HashiCorp provider TestAcc suites; use generic Go test skills for non-Terraform unit tests without TF_ACC requirements.
FAQ
What environment variable enables acceptance tests?
Set TF_ACC=1 when running go test -run=TestAcc...
How do I avoid cached pass results while debugging?
Rerun with -count=1, then add -v or TF_LOG=debug as needed.
What is a flip test?
Edit a TestCheckFunc expected value, expect failure, undo on success to catch false negatives.
Is Run Acceptance Tests safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.