Logotipo de Go Testing

Go Testing

OrganizaciónPopular
GetStream
go-testing

How Go tests are written in acceleration/ and sdks/go. Read before adding a test or a test suite.

Descripción general

EditorGetStream
RepositorioAgents
Nombre de la habilidadgo-testing
Estrellas
8.2K
Forks
709
Archivos incluidos
3
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Archivos incluidos: 3

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por GetStream en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Go Testing en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/GetStream/Agents/tree/main/.claude/skills/go-testing
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/GetStream/Agents.git /tmp/Agents
mkdir -p .claude/skills
cp -r /tmp/Agents/.claude/skills/go-testing .claude/skills/go-testing
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Go Testing en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Go Testing automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Go Testing no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Go testing

Rules

  • Group tests in a testify suite (suite.Suite). Shared setup lives in the suite, in one place.
  • Never mock. A provider is a stub registered in its router's registry, or the real one behind an integration build tag; everything else is real.
  • Test behaviour through the outside. Assert on outputs and state, never on which method was called.
  • Name a test as the sentence it proves: TestAnIdAnotherSessionHasIsRefused.
  • Avoid table tests, common as they are in Go. Write one test per behaviour, each named for what it proves, and put what they share in the suite or a helper.
  • Anything that needs Postgres, Redis or a provider's API starts with //go:build integration and skips, rather than fails, when what it needs is not configured.
  • Outside a suite, check with require, never testify/assert: a failed check stops the test there.
  • A unit test that waits on a real timer runs in a testing/synctest bubble, where the timer fires at once (AgentSuite.onFakeClock in internal/agent). Make the goroutines and channels the test waits on inside the bubble: a goroutine that waits on something from outside stops the fake clock. A test that waits on network I/O stays on the real clock, with or without a build tag (an integration test, or a unit test on a local socket): a wait on network I/O stops the fake clock. A test that needs real time between two events also stays on the real clock: on the fake clock, work that does not wait takes no time.
  • Every skip says what keeps the test from running: the env var or tool that is missing, or what the provider cannot do. A skip with no such reason ("pending fixture") is a test to fix or delete.

Which kind of test

Read the file for what you are testing:

  • controllers.md: HTTP operations in internal/api, run against the whole router with RouterSuite. Who may call an endpoint, whose a resource is, fixtures, parallel suites.
  • store.md: the models and queries in internal/store, run against Postgres with StoreSuite.
  • ai-routing.md: STT, TTS, STS, LLM, search and the other AI providers and their routers. One shared suite per kind of AI that every provider embeds.

Before you push

Checks a reviewer runs and an author often skips:

  • Mutate every rule you added, at every call site, in a scratch copy: delete the clause, make the condition true, empty a migration's Down. A mutant no test fails is a missing test.
  • Run the touched suites on the merge with current origin/main. CI's green is from the main it ran on.
  • An entry added to a shared list (dataTables, importedModels, usageIndexes) changes every reader of that list: read each one.
  • Round-trip an id that moves, is derived or is replayed: A to B to A, and a second run, each end as one row.
  • A shipped migration never runs again: change it in a new one.
  • A new migration is expand-only: it drops or renames nothing the release before still reads or writes.
  • A migration's lock timeout is in the go skill's store.md ("Which database"). Its version slot is in the parallel-agents skill ("Migration versions").
  • Work moved onto context.WithoutCancel takes its follow-on calls (billing, the cache drop) with it.
  • A fix covers every path to the same data: each writer, and each copy of it (a cache, data_changes).

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Son archivos de solo lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Go Testing?

How Go tests are written in acceleration/ and sdks/go. Read before adding a test or a test suite.

¿Por qué usar Go Testing en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Go Testing está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Go Testing en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/GetStream/Agents/tree/main/.claude/skills/go-testing. TypingMind lee el archivo SKILL.md de esa carpeta, empaqueta los archivos de la carpeta e instala el conjunto como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Go Testing?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Go Testing?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Go Testing con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Go Testing?

Sí. GetStream la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇