An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/iris-contrib/httpexpect

Package httpexpect helps with end-to-end HTTP and REST API testing. See example directory: There are two common ways to test API with httpexpect: The second approach works only if the server is a Go module and its handler can be imported in tests. Concrete behaviour is determined by Client implementation passed to Config struct. If you're using http.Client, set its Transport field (http.RoundTriper) to one of the following: Note that http handler can be usually obtained from http framework you're using. E.g., echo framework provides either http.Handler or fasthttp.RequestHandler. You can also provide your own implementation of RequestFactory (creates http.Request), or Client (gets http.Request and returns http.Response). If you're starting server from tests, it's very handy to use net/http/httptest. Whenever values are checked for equality in httpexpect, they are converted to "canonical form": This is equivalent to subsequently json.Marshal() and json.Unmarshal() the value and currently is implemented so. When some check fails, failure is reported. If non-fatal failures are used (see Reporter interface), execution is continued and instance that was checked is marked as failed. If specific instance is marked as failed, all subsequent checks are ignored for this instance and for any child instances retrieved after failure. Example:

Ecosystem
proxy.golang.org
Latest Release
v1.1.2
almost 6 years ago
Versions
2
Dependent Packages
196
Dependent Repos
177
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/iris-contrib/httpexpect
spec
License MIT
Namespace github.com/iris-contrib
First Release almost 7 years ago
Last Synced 21 days ago
Repository
Stars 3 on GitHub
Forks 1 on GitHub
Docker Dependents 4
Docker Downloads 1,423
Rankings on proxy.golang.org
Overall Top 6.1%
Dependent packages Top 0.3%
Dependent repos Top 0.5%
Docker downloads Top 1.5%