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.
Instalar con mi Agente
Copia esta solicitud en tu Agente. Incluye la página canónica del Skill y el manifiesto.
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.Tu Agente debe seguir mostrando su plan y solicitar cualquier confirmación exigida por la política de seguridad.
Recursos legibles por agentes
Usa estos enlaces cuando un agente de IA, crawler o script necesite contexto limpio en vez de leer la página completa.
Pruébalo
Usando "golang-testing". Review tests that report every price subtest as passing even when the parent fails.
Resultado esperado:
- 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.
Usando "golang-testing". Plan tests for a PostgreSQL order repository without affecting normal unit tests.
Resultado esperado:
- 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.
Usando "golang-testing". Improve tests for a worker pool that may leak goroutines.
Resultado esperado:
- 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.
Auditoría de seguridad
Riesgo medioAll 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.
Preocupaciones de seguridad confirmadas (1)
Factores de riesgo
⚙️ Comandos externos (50)
🌐 Acceso a red (6)
📁 Acceso al sistema de archivos (2)
⚡ Contiene scripts (6)
🔑 Variables de entorno (1)
Compartir y citar este informe
Comparte el informe de evaluación versionado, la insignia neutral, la tarjeta insertable y las citas. Skillstore presenta evidencias sin decidir si este Skill es seguro.
Copiar enlace del informe
https://skillstore.io/skills/samber-golang-testing/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportInsignia Markdown
[](https://skillstore.io/skills/samber-golang-testing?utm_source=security_passport_badge)Insignia 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>Tarjeta para insertar
<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>Citas académicas (APA · BibTeX · CFF)
Cita 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/1Cita 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"
Comparar variantes
2 variantes instalablesCada autor sigue siendo un skill instalable independiente. La variante recomendada se ordena según la evidencia de Skillstore.
Por qué esta variante es la primera
89jobrien-golang-testing
2026-10-18
samber-golang-testing
2026-10-16
Puntuación de Skillstore
Por qué esta puntuación Confianza de la evidencia: MedioLo que puedes crear
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.
Prueba estos 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.
Mejores prácticas
- 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.
Evitar
- 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.