golang-testing
Build Reliable Go Tests
Go test suites can miss edge cases, leak goroutines, and fail unpredictably. This skill guides test design, review, and debugging with concrete Go testing patterns.
自分のエージェントでインストール
このリクエストをエージェントにコピーしてください。正規の Skill ページとマニフェストが含まれています。
Review the Skillstore skill "golang-testing" from https://skillstore.io/skills/samber-golang-testing.md and its manifest at https://skillstore.io/api/skills/samber-golang-testing/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.エージェントは引き続き計画を提示し、セキュリティポリシーで必要な確認を求める必要があります。
エージェントが読めるリソース
AI エージェント、クローラー、スクリプトがページ全体ではなく整理されたコンテキストを必要とする場合は、これらのリンクを使ってください。
テストする
「golang-testing」を使用しています。 Review tests that report every price subtest as passing even when the parent fails.
期待される結果:
- Finding: the assertion helper captures the parent test instead of the current subtest.
- Correction: create the assertion helper inside each subtest.
- Verification: deliberately break one expected result and confirm that the matching subtest reports failure.
「golang-testing」を使用しています。 Plan tests for a PostgreSQL order repository without affecting normal unit tests.
期待される結果:
- Separate database tests with an integration build tag.
- Start a disposable fixture, load the schema, reset records between tests, and close connections during teardown.
- Bind fixture ports to loopback and keep production credentials out of the test environment.
- Cover creation, missing records, user filtering, and database errors.
「golang-testing」を使用しています。 Improve tests for a worker pool that may leak goroutines.
期待される結果:
- Add package-level goroutine leak checks and verify shutdown after queued work completes.
- Coordinate workers with explicit synchronization instead of arbitrary delays.
- Run concurrent access tests with race detection and keep each test independently runnable.
セキュリティ監査
中リスクAll 135 static alerts are false positives involving documentation, Go syntax, mocks, or explicit test operations. A separate integration fixture exposes weakly authenticated PostgreSQL and unauthenticated Redis through unrestricted host port bindings. No evidence found of malicious intent, credential exfiltration, or security-review prompt injection.
確認済みのセキュリティ上の懸念 (1)
リスク要因
⚙️ 外部コマンド (50)
🌐 ネットワークアクセス (6)
📁 ファイルシステムへのアクセス (2)
⚡ スクリプトを含む (6)
🔑 環境変数 (1)
このレポートを共有・引用
バージョン付き評価レポート、中立的なバッジ、埋め込みカード、引用を共有できます。Skillstore は証拠を報告しますが、この Skill が安全かどうかは判断しません。
レポートリンクをコピー
https://skillstore.io/skills/samber-golang-testing/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdownバッジ
[](https://skillstore.io/skills/samber-golang-testing?utm_source=security_passport_badge)HTMLバッジ
<a href="https://skillstore.io/skills/samber-golang-testing?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/samber-golang-testing/security.svg" alt="Skillstore security assessment" loading="lazy"></a>埋め込みカード
<iframe src="https://skillstore.io/embed/skills/samber-golang-testing.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学術引用 (APA · BibTeX · CFF)
APA形式の引用
samber. (2026). golang-testing security audit report (audit version 1) [Author version 1.4.0]. Skillstore. https://skillstore.io/skills/samber-golang-testing/audits/1BibTeX形式の引用
@techreport{samber-samber-golang-testing-2026,
author = {samber},
title = {golang-testing security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-testing/audits/1},
note = {Author version 1.4.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-testing security audit report (audit version 1)"
version: "1.4.0"
type: report
authors:
- name: "samber"
date-released: "2026-10-15"
url: "https://skillstore.io/skills/samber-golang-testing/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-testing:audit:1"
description: "Skillstore immutable audit report identifier"
バリアントを比較
インストール可能なバリアント 2 件各作者のスキルは個別のインストール項目として維持されます。推奨バリアントは Skillstore の証拠で順位付けされます。
このバリアントが首位の理由
89jobrien-golang-testing
2026-10-18
Skillstore スコア
このスコアの理由 証拠の信頼度: 中作成できるもの
Add Unit Coverage
Create named subtests for public functions, boundary inputs, and error paths without coupling tests to private fields.
Review Test Reliability
Inspect pull request tests for assertion scope errors, shared mutable state, timing dependencies, and missing race checks.
Organize Integration Testing
Plan build-tagged database suites with fixture setup, per-test cleanup, and isolated test services.
これらのプロンプトを試す
Write named table-driven tests for [function]. Cover normal inputs, empty inputs, boundary cases, and documented errors. Assert observable results.
Test [handler] using request and response recorders. Cover valid requests, malformed bodies, missing authentication, and validation errors. Assert status, headers, and response content.
Investigate flaky tests in [package]. Check shared state, goroutine cleanup, assertion scope, and timing dependencies. Propose deterministic tests and race detection commands.
Audit [repository] for unit coverage gaps, integration isolation, and goroutine risks. Separate findings by concern. Prioritize fixes with evidence and focused tests. Require disposable databases and loopback-only services.
ベストプラクティス
- Assert public behavior with named cases, including boundary inputs and failure paths.
- Use disposable fixtures, loopback-only services, and explicit cleanup for integration tests.
- Match examples to your Go version and run focused tests before expanding coverage.
回避
- Treating a high coverage percentage as proof that assertions are correct.
- Sharing mutable fixtures, relying on execution order, or using arbitrary sleeps for synchronization.
- Running destructive fixture cleanup against shared databases or exposing test services to untrusted networks.