{"id":46682228,"url":"https://github.com/go-andiamo/marrow","last_synced_at":"2026-03-09T00:34:04.875Z","repository":{"id":322842878,"uuid":"1081205468","full_name":"go-andiamo/marrow","owner":"go-andiamo","description":"An API integration test framework — for testing APIs written in Go, using a framework written in Go, with tests written in Go","archived":false,"fork":false,"pushed_at":"2026-02-26T13:24:26.000Z","size":586,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-26T19:54:43.994Z","etag":null,"topics":["api-testing","go","golang","integration-testing","rest-api","restful-api","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-andiamo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-22T13:06:33.000Z","updated_at":"2026-02-26T13:23:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/go-andiamo/marrow","commit_stats":null,"previous_names":["go-andiamo/marrow"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/go-andiamo/marrow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-andiamo%2Fmarrow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-andiamo%2Fmarrow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-andiamo%2Fmarrow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-andiamo%2Fmarrow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-andiamo","download_url":"https://codeload.github.com/go-andiamo/marrow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-andiamo%2Fmarrow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30278556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-testing","go","golang","integration-testing","rest-api","restful-api","testing"],"created_at":"2026-03-09T00:34:02.051Z","updated_at":"2026-03-09T00:34:04.864Z","avatar_url":"https://github.com/go-andiamo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Marrow\n[![GoDoc](https://godoc.org/github.com/go-andiamo/marrow?status.svg)](https://pkg.go.dev/github.com/go-andiamo/marrow)\n[![Latest Version](https://img.shields.io/github/v/tag/go-andiamo/marrow.svg?sort=semver\u0026style=flat\u0026label=version\u0026color=blue)](https://github.com/go-andiamo/marrow/releases)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-andiamo/marrow)](https://goreportcard.com/report/github.com/go-andiamo/marrow)\n\nAn API integration test framework - for testing APIs written in Go, using a framework written in Go, with tests written in Go.\n\n## Features\n\n- **Composable DSL for end-to-end API scenarios**  \n  Describe tests as readable, fluent flows – no test YAML, no magic, just Go.\n\n- **Black-box testing of any API**  \n  Hit a real HTTP endpoint and assert on both the response *and* what it did to its dependencies. Works regardless of what language/framework the API is written in.\n\n- **Real dependency “wraps” (not mocks)**  \n  Spin up real services as test dependencies (e.g. MongoDB, LocalStack/AWS services, message brokers) and assert on their state and events.\n\n- **Full coverage support**  \n  Execute the API tests and optionally report endpoint coverage (even against a provided OAS spec)  \n  Coverage reports can also supply timings (inc. averages, variance, P50, P90, P99) - with built-in support for repeated runs.\n\n- **Resolvable values**  \n  Uniform mechanism for “values that come from somewhere”: JSON fields, variables, database queries, message payloads, lengths, first/last elements, etc.\n\n- **Powerful assertions**  \n  Rich set of assertion helpers over response payloads, headers, status codes, dependency state, and captured events.\n\n- **Variables**  \n  Declare vars once, `SetVar()` from responses or dependencies, and reuse them across steps. IDE refactoring-friendly because var names are just Go identifiers.\n\n- **Conditional flows**  \n  `If(...)` / `IfNot(...)` blocks let you express conditional logic directly in the DSL without branching mess in test code.\n\n- **Capturing and inspecting side effects**  \n  Capture SNS/SQS-style publishes, queue messages, Mongo changes, etc., and assert on count, content, and ordering.\n\n- **Composable helpers**  \n  Small building blocks (values, assertions, conditionals, captures) that can be combined arbitrarily – everything is designed to be reused and extended.\n\n- **Extensible dependency model**  \n  Built-in examples (Mongo, LocalStack, etc.) double as templates for adding your own dependency “wraps” with minimal boilerplate.\n\n- **First-class Go testing integration**  \n  Plays nicely with `testing.T`, subtests, and your existing tooling; tests are just Go code, no additional runner or framework ceremony.\n\n- **Build freshness guard (`make` integration)**  \n  Optionally run a `make` target before tests, so every scenario runs against the latest build artefact instead of whatever binary happened to be lying around.\n\n- **IDE-friendly \u0026 CI/CD-friendly**  \n  Runs identically in GoLand, VS Code, your terminal, GitHub Actions, GitLab CI, Jenkins, or any CI/CD pipeline.  \n  No custom runners, no plugins, no hidden runtime - just `go test`.\n\n\n## Design Philosophy\n\nThe intent of the design is to describe API tests in a non-abstract DSL (Domain Specific Language) that can be used by developers and QAs alike.\n\nWe've specifically avoided terms like \"scenario\" - instead using terms like \"endpoint\" \u0026 \"method\" to describe what's being tested.\n\n## Example\n\nFull working demo examples can be found in [Petstore](https://github.com/go-andiamo/marrow/tree/main/_examples/petstore/_integration_tests) and [Petstore with db and API image](https://github.com/go-andiamo/marrow/tree/main/_examples/petstore_db_image/_integration_tests)\n\nAn example of what the tests definition looks like...\n\n```go\npackage main\n\nimport (\n    . \"github.com/go-andiamo/marrow\"\n)\n\nvar endpointTests = []Endpoint_{\n    Endpoint(\"/api\", \"Root\",\n        Method(GET, \"Get root\").\n            AssertOK().\n            AssertEqual(JsonPath(Body, \"hello\"), \"world\"),\n        Endpoint(\"/categories\", \"Categories\",\n            Method(GET, \"Get first category id (used for creating pet)\").\n                RequireOK().\n                RequireGreaterThan(JsonPath(Body, LEN), 0).\n                SetVar(After, \"category-id\", JsonPath(JsonPath(Body, \"0\"), \"id\")),\n        ),\n        Endpoint(\"/pets\", \"Pets\",\n            Method(GET, \"Get pets (empty)\").\n                AssertOK().\n                AssertLen(Body, 0),\n            Method(POST, \"Create pet\").\n                RequestBody(JSON{\n                    \"name\": \"Felix\",\n                    \"dob\":  \"2025-11-01\",\n                    \"category\": JSON{\n                        \"id\": Var(\"category-id\"),\n                    },\n                }).\n                AssertCreated().\n                SetVar(After, \"created-pet-id\", JsonPath(Body, \"id\")),\n            Endpoint(\"/{petId}\", \"Pet\",\n                Method(GET, \"Get pet (not found)\").\n                    PathParam(Var(\"non-uuid\")).\n                    AssertNotFound(),\n                Method(PUT, \"Update pet (not found)\").\n                    PathParam(Var(\"non-uuid\")).\n                    AssertNotFound(),\n                Method(PUT, \"Update pet successful\").\n                    PathParam(Var(\"created-pet-id\")).\n                    RequestBody(JSON{\n                        \"name\": \"Feline\",\n                        \"dob\":  \"2025-11-02\",\n                        \"category\": JSON{\n                            \"id\": Var(\"category-id\"),\n                        },\n                    }).\n                    AssertOK(),\n                Method(DELETE, \"Delete pet (not found)\").\n                    PathParam(Var(\"non-uuid\")).\n                    AssertNotFound(),\n                Method(DELETE, \"Delete pet successful\").\n                    PathParam(Var(\"created-pet-id\")).\n                    AssertNoContent(),\n            ),\n        ),\n        Endpoint(\"/categories\", \"Categories\",\n            Method(GET, \"Get categories\").\n                AssertOK().\n                AssertGreaterThan(JsonPath(Body, LEN), 0),\n            Endpoint(\"/{categoryId}\", \"Category\",\n                Method(GET, \"Get category (not found)\").\n                    PathParam(Var(\"non-uuid\")).\n                    AssertNotFound(),\n                Method(GET, \"Get category (found)\").\n                    PathParam(Var(\"category-id\")).\n                    AssertOK(),\n            ),\n        ),\n    ),\n}\n```\n\nAnd to run the endpoints tests...\n\n```go\npackage main\n\nimport (\n    . \"github.com/go-andiamo/marrow\"\n)\n\nfunc main() {\n    s := Suite(endpoints...)\n    err := s.Init(/* whatever initializers needed */).Run()\n    if err != nil {\n        panic(err)\n    }\n}\n```\n\nOr to run as part of Go tests...\n\n```go\npackage main\n\nimport (\n    . \"github.com/go-andiamo/marrow\"\n    \"github.com/go-andiamo/marrow/with\"\n    \"testing\"\n)\n\nfunc TestApi(t *testing.T) {\n    s := Suite(endpoints...)\n    err := s.Init(\n        with.Testing(t),\n        /* whatever other initializers needed */).Run()\n    if err != nil {\n        t.Fatal(err)\n    }\n}\n```\n\n## Installation\n\n    go get github.com/go-andiamo/marrow\n\n## Supporting images\n\n_Marrow_ comes with several ready-rolled supporting images for common dependencies (more to come)...\n\n- [Artemis](https://github.com/go-andiamo/marrow/tree/main/images/artemis)  \n  `go get github.com/go-andiamo/marrow/images/artemis`\n- [Dragonfly](https://github.com/go-andiamo/marrow/tree/main/images/dragonfly) (drop-in replacement for Redis)  \n  `go get github.com/go-andiamo/marrow/images/dragonfly`\n- [Kafka](https://github.com/go-andiamo/marrow/tree/main/images/kafka)  \n  `go get github.com/go-andiamo/marrow/images/kafka`\n- [AWS localstack](https://github.com/go-andiamo/marrow/tree/main/images/localstack)  \n  `go get github.com/go-andiamo/marrow/images/localstack`\n- [MongoDB](https://github.com/go-andiamo/marrow/tree/main/images/mongo)  \n  `go get github.com/go-andiamo/marrow/images/mongo`\n- [MySql](https://github.com/go-andiamo/marrow/tree/main/images/mysql)  \n  `go get github.com/go-andiamo/marrow/images/mysql`\n- [Nats](https://github.com/go-andiamo/marrow/tree/main/images/nats)  \n  `go get github.com/go-andiamo/marrow/images/nats`\n- [Postgres](https://github.com/go-andiamo/marrow/tree/main/images/postgres)  \n  `go get github.com/go-andiamo/marrow/images/postgres`\n- [Redis](https://github.com/go-andiamo/marrow/tree/main/images/redis7)  \n  `go get github.com/go-andiamo/marrow/images/redis7`\n\nSupport images can also be used independently of _Marrow_ in unit testing - see [example](https://github.com/go-andiamo/marrow/blob/main/_examples/petstore_db_image/repository/repository_test.go)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-andiamo%2Fmarrow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-andiamo%2Fmarrow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-andiamo%2Fmarrow/lists"}