Popularity
1.2
Growing
Activity
3.1
Declining
16
0
0

Programming language: Go
License: MIT License
Tags: Testing     Testing Frameworks    
Latest version: v2.0.0

flute alternatives and similar packages

Based on the "Testing Frameworks" category.
Alternatively, view flute alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of flute or a related project?

Add another 'Testing Frameworks' Package

README

flute

Mentioned in Awesome Go GoDoc Build Status codecov Go Report Card GitHub last commit GitHub tag License

Golang HTTP client testing framework

Presentation

https://speakerdeck.com/szksh/flute-golang-http-client-testing-framework

Overview

flute is the Golang HTTP client testing framework. The goal is

  • Test request parameters such as the request path, headers and body
  • Mock the HTTP server

flute.Transport implements http.RoundTripper.

flute uses testify's assert internally. You can test the http request parameters with assert.

For example, the following test failure message means the request header is unexpected value.

=== RUN   TestClient_CreateUser
--- FAIL: TestClient_CreateUser (0.00s)
    tester.go:168:
                Error Trace:    tester.go:168
                                                        tester.go:32
                                                        transport.go:25
                                                        client.go:250
                                                        client.go:174
                                                        client.go:641
                                                        client.go:509
                                                        create_user.go:45
                                                        create_user_test.go:56
                Error:          Not equal:
                                expected: []string{"token XXXXX"}
                                actual  : []string{"token "}

                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1,3 +1,3 @@
                                 ([]string) (len=1) {
                                - (string) (len=11) "token XXXXX"
                                + (string) (len=6) "token "
                                 }
                Test:           TestClient_CreateUser
                Messages:       the request header "Authorization" should match
                                service: http://example.com
                                request name: create a user

Please see the example.

Example

Please see [examples](examples).

License

[MIT](LICENSE)


*Note that all licence references and agreements mentioned in the flute README section above are relevant to that project's source code only.