https://github.com/steinfletcher/apitest-plantuml
:seedling: Formats the results of an apitest run as PlantUML markup
https://github.com/steinfletcher/apitest-plantuml
api-testing apitest behavioural-tests golang plantuml sequence-diagram
Last synced: about 2 months ago
JSON representation
:seedling: Formats the results of an apitest run as PlantUML markup
- Host: GitHub
- URL: https://github.com/steinfletcher/apitest-plantuml
- Owner: steinfletcher
- Created: 2019-02-17T06:45:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-14T05:29:12.000Z (almost 4 years ago)
- Last Synced: 2025-03-23T20:04:39.781Z (2 months ago)
- Topics: api-testing, apitest, behavioural-tests, golang, plantuml, sequence-diagram
- Language: Go
- Homepage:
- Size: 136 KB
- Stars: 20
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# apitest-plantuml
[](https://godoc.org/github.com/steinfletcher/apitest-plantuml)
[](https://travis-ci.org/steinfletcher/apitest-plantuml)Formats the results of an [apitest](https://github.com/steinfletcher/apitest) run as plant uml markup.
## Installation
```bash
go get -u github.com/steinfletcher/apitest-plantuml
```## Example
```go
apitest.New("search user").
Handler(myHandler).
Report(plantuml.NewFormatter(myWriter)).
Mocks(getPreferencesMock, getUserMock).
Post("/user/search").
Body(`{"name": "jon"}`).
Expect(t).
Status(http.StatusOK).
Header("Content-Type", "application/json").
Body(`{"name": "jon", "is_contactable": true}`).
End()
```
[SVG version](https://www.plantuml.com/plantuml/svg/fPFBJiCm44NtynMZhAX4IPEsI6I1AY6W4aYjrEoHSQUDIs97jhC0nBzZkpoIbaSHMJapetlld3WJOvcsJLM2UH2oPffLA9MbAoNjGZmH9achKocfUA5LHMXrGn3nKaJzyyWqDihmAEdXVBR8CMuCwTWGqxn0y7AenRgmiD-TvlayJauIc2fZCsHrNGhEh50Iu1dGFP5a5JdrQADa12z0SXaIGd1rvbxEUFkqXzUNEHRMrbaSN4pCQh7rIzBXQDm9usTt-pjnWWP0otDhrl_SUTZ3T31u4ovfPU5T8zHdDt3XK9Aq_LkIQrjac9vzbFB7cZfBnnlppUR7sv9O-e8F-oMBMjEAD4bEWSYeGwJL37kttt_0ip-sGwarq67L3jCYDluxiT6Xn8IvuswISSlkIyykNDCzK2wClxakpEaXOIHnRvKXBvMX_tozt-B1n1tzt_WA)