Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nao1215 committed Oct 11, 2023
1 parent f3c6fa6 commit 9dd3ad3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,14 @@ func TestApi(t *testing.T) {
```

It is possible to override the default storage location by passing the formatter instance `Report(spectest.NewSequenceDiagramFormatter(".sequence-diagrams"))`. If you want to change the report file name , you use `CustomReportName("file name is here")` . By default, the hash value becomes the report file name.

You can bring your own formatter too if you want to produce custom output. By default a sequence diagram is rendered on a html page.

The spectest checks the Content Type of the response. If it's an image-related MIME type, the image will be displayed in the report. In the apitest, binary data was being displayed.

![DiagramSample](doc/image/sample_diagram.png)


#### Debugging http requests and responses generated by api test and any mocks

```go
Expand Down
Binary file added doc/image/sample_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9dd3ad3

Please sign in to comment.