apitest

Examples

Complete example projects in the apitest repository, and the tested examples behind these docs.

Example projects

The examples directory of the apitest repository has complete, runnable projects.

ExampleShows
ginA gin application.
echoAn echo application.
fiberA fiber application, adapted to net/http.
gorillaThe gorilla web toolkit.
httprouterjulienschmidt/httprouter.
irisAn iris application.
graphqlA gqlgen GraphQL server.
ginkgoTests written as Ginkgo specs.
mocksMocking outbound calls, including a custom matcher.
websocketsA websocket handler under test.
sequence-diagramsGenerating sequence diagrams.
sqlite, mysql, postgresDatabase queries in sequence diagrams.

Live reports

Reports generated by the examples on this site:

The examples behind these docs

Every code sample on this site is included from a Go module of tests that run against the latest apitest release. The samples are therefore real, compiling code, and each one passes.

On this page