You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Concise, declarative, and easy to use end-to-end HTTP and REST API testing for Go (golang).
4
4
@@ -48,7 +48,7 @@ Workflow:
48
48
49
49
##### Tuning
50
50
51
-
* Tests can communicate with server via real HTTP client or invoke `net/http`or [`fasthttp`](https://github.com/valyala/fasthttp/)handler directly.
51
+
* Tests can communicate with server via real HTTP client or invoke `net/http` handler directly.
52
52
* Custom HTTP client, logger, printer, and failure reporter may be provided by user.
53
53
* Custom HTTP request factory may be provided, e.g. from the Google App Engine testing.
54
54
@@ -61,51 +61,21 @@ The current stable branch is `v2`. Previous branches are still maintained, but n
61
61
If you're using go.mod, use a versioned import path:
62
62
63
63
```go
64
-
import"github.com/gavv/httpexpect/v2"
65
-
```
66
-
67
-
Otherwise, use gopkg.in import path:
68
-
69
-
```go
70
-
import"gopkg.in/gavv/httpexpect.v2"
64
+
import"github.com/iris-contrib/httpexpect/v2"
71
65
```
72
66
73
67
## Documentation
74
68
75
-
Documentation is available on [GoDoc](https://godoc.org/github.com/gavv/httpexpect). It contains an overview and reference.
69
+
Documentation is available on [GoDoc](https://godoc.org/github.com/iris-contrib/httpexpect). It contains an overview and reference.
76
70
77
71
## Examples
78
72
79
73
See [`_examples`](_examples) directory for complete standalone examples.
80
74
81
-
*[`fruits_test.go`](_examples/fruits_test.go)
82
-
83
-
Testing a simple CRUD server made with bare `net/http`.
84
-
85
75
*[`iris_test.go`](_examples/iris_test.go)
86
76
87
77
Testing a server made with [`iris`](https://github.com/kataras/iris/) framework. Example includes JSON queries and validation, URL and form parameters, basic auth, sessions, and streaming. Tests invoke the `http.Handler` directly.
88
78
89
-
*[`echo_test.go`](_examples/echo_test.go)
90
-
91
-
Testing a server with JWT authentication made with [`echo`](https://github.com/labstack/echo/) framework. Tests use either HTTP client or invoke the `http.Handler` directly.
92
-
93
-
*[`gin_test.go`](_examples/gin_test.go)
94
-
95
-
Testing a server utilizing the [`gin`](https://github.com/gin-gonic/gin) web framework. Tests invoke the `http.Handler` directly.
96
-
97
-
*[`fasthttp_test.go`](_examples/fasthttp_test.go)
98
-
99
-
Testing a server made with [`fasthttp`](https://github.com/valyala/fasthttp) package. Tests invoke the `fasthttp.RequestHandler` directly.
Testing a WebSocket server based on [`gorilla/websocket`](https://github.com/gorilla/websocket). Tests invoke the `http.Handler` or `fasthttp.RequestHandler` directly.
104
-
105
-
*[`gae_test.go`](_examples/gae_test.go)
106
-
107
-
Testing a server running under the [Google App Engine](https://en.wikipedia.org/wiki/Google_App_Engine).
108
-
109
79
## Quick start
110
80
111
81
##### Hello, world!
@@ -118,7 +88,7 @@ import (
118
88
"net/http/httptest"
119
89
"testing"
120
90
121
-
"github.com/gavv/httpexpect/v2"
91
+
"github.com/iris-contrib/httpexpect/v2"
122
92
)
123
93
124
94
funcTestFruits(t *testing.T) {
@@ -440,17 +410,6 @@ e := httpexpect.WithConfig(httpexpect.Config{
440
410
Jar: httpexpect.NewJar(),
441
411
},
442
412
})
443
-
444
-
// invoke fasthttp.RequestHandler directly using httpexpect.FastBinder
0 commit comments