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.
Installer avec mon Agent
Copiez cette demande dans votre Agent. Elle contient la page Skill de référence et le manifeste.
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.Votre Agent doit toujours présenter son plan et demander toute confirmation exigée par la politique de sécurité.
Ressources lisibles par les agents
Utilisez ces liens lorsquâun Agent IA, un crawler ou un script a besoin dâun contexte propre au lieu de lire toute la page.
Tester
Utilisation de « golang-testing ». Review tests that report every price subtest as passing even when the parent fails.
Résultat attendu:
- 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.
Utilisation de « golang-testing ». Plan tests for a PostgreSQL order repository without affecting normal unit tests.
Résultat attendu:
- 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.
Utilisation de « golang-testing ». Improve tests for a worker pool that may leak goroutines.
Résultat attendu:
- 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.
Audit de sécurité
Risque moyenAll 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.
Préoccupations de sécurité confirmées (1)
Facteurs de risque
âïž Commandes externes (50)
đ AccĂšs rĂ©seau (6)
đ AccĂšs au systĂšme de fichiers (2)
⥠Contient des scripts (6)
đ Variables dâenvironnement (1)
Partager et citer ce rapport
Partagez le rapport dâĂ©valuation versionnĂ©, le badge neutre, la carte intĂ©grable et les citations. Skillstore prĂ©sente les preuves sans dĂ©cider si ce Skill est sĂ»r.
Copier le lien du rapport
https://skillstore.io/skills/samber-golang-testing/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportBadge Markdown
[](https://skillstore.io/skills/samber-golang-testing?utm_source=security_passport_badge)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>Carte intégrable
<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>Citations académiques (APA · BibTeX · CFF)
Citation 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/1Citation BibTeX
@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"
Comparer les variantes
2 variantes installablesChaque auteur reste un skill installable distinct. La variante recommandée est classée selon les preuves Skillstore.
Pourquoi cette variante est premiĂšre
89jobrien-golang-testing
2026-10-18
samber-golang-testing
2026-10-16
Score Skillstore
Pourquoi ce score Niveau de confiance des preuves: MoyenCe que vous pouvez créer
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.
Essayez ces prompts
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.
Bonnes pratiques
- 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.
Ăviter
- 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.
Foire aux questions
Which assistants can use this skill?
Does the skill run tests by itself?
Which dependencies are required?
Can integration tests stay separate from unit tests?
Will the examples work with every Go version?
Are the container fixtures secure without changes?
Détails du développeur
Auteur
samberLicence
MIT
Version de lâauteur
v1.4.0
Révision Skillstore
r1
Réf
90e1abf0bb1c348e03c0f47c2cfd02c8efaf3214
Récence de maintenance
15/10/2026
Utilisation
0 téléchargements · 0 vues
Structure de fichiers
đ evals/
đ evals.json
đ references/
đ benchmarks.md
đ coverage.md
đ examples.md
đ helpers.md
đ http-testing.md
đ mocking.md
đ SKILL.md