スキル一覧に戻る

run-acceptance-tests

hashicorp
更新日 2 days ago
5 閲覧
631
75
631
GitHubで表示
テストtestingdesign

について

このスキルは、Terraformプロバイダーの受け入れテスト(`TestAcc`で始まるもの)を実行するためのガイド付きワークフローを提供します。必要な環境変数`TF_ACC=1`の設定を処理し、プロバイダー固有の認証情報の管理についてアドバイスを行います。また、累積的なデバッグオプションを使用して失敗したテストを診断する手順も含まれています。

クイックインストール

Claude Code

推奨
メイン
npx skills add hashicorp/agent-skills -a claude-code
プラグインコマンド代替
/plugin add https://github.com/hashicorp/agent-skills
Git クローン代替
git clone https://github.com/hashicorp/agent-skills.git ~/.claude/skills/run-acceptance-tests

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

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.
  2. 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.
  2. Offer verbose go test output. Use the -v option.
  3. Offer debug-level logging. Enable debug-level logging with the environment variable TF_LOG=debug.
  4. 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.
  2. Run the acceptance test. Expect the test to fail.
  3. If the test fails, then undo the edit and report a successful flip. Else, keep the edit and report an unsuccessful flip.

GitHub リポジトリ

hashicorp/agent-skills
パス: terraform/provider-development/skills/run-acceptance-tests
0
doormat-managed

関連スキル

evaluating-llms-harness

テスト

このClaudeスキルは、lm-evaluation-harnessを実行し、MMLUやGSM8Kなど60以上の標準化学術タスクでLLMをベンチマークします。開発者がモデルの品質を比較し、トレーニングの進捗を追跡し、学術的な結果を報告するために設計されています。このツールはHuggingFaceやvLLMモデルを含む様々なバックエンドをサポートしています。

スキルを見る

cloudflare-cron-triggers

テスト

このスキルは、cron式を使用してWorkersをスケジュールするためのCloudflare Cron Triggersの実装に関する包括的な知識を提供します。定期的なタスクの設定、メンテナンスジョブ、自動化されたワークフローの構築を網羅し、無効なcron式やタイムゾーン問題といった一般的な課題への対処法も含みます。開発者はこれを使用して、スケジュールされたハンドラーの設定、cronトリガーのテスト、WorkflowsやGreen Computeとの連携を構成できます。

スキルを見る

webapp-testing

テスト

このClaude Skillは、Playwrightベースのツールキットを提供し、Pythonスクリプトを通じてローカルWebアプリケーションのテストを可能にします。フロントエンドの検証、UIデバッグ、スクリーンショット撮影、ログ表示を実現し、サーバーライフサイクルを管理します。ブラウザ自動化タスクにご利用いただけますが、コンテキストの汚染を避けるため、スクリプトのソースコードを読むのではなく直接実行してください。

スキルを見る

finishing-a-development-branch

テスト

このスキルは、開発者がテストの合格を確認し、構造化された統合オプションを提示することで、完成した作業を仕上げることを支援します。実装が完了した後のマージ、PR作成、ブランチの整理といったワークフローを案内します。コードが準備できてテスト済みの際に使用し、開発プロセスを体系的に完了させましょう。

スキルを見る