An open API service providing repository metadata for many open source software ecosystems.

Package Usage: go: github.com/emicklei/forest

Package forest has functions for REST Api testing in Go This package provides a few simple helper types and functions to create functional tests that call HTTP services. A test uses a forest Client which encapsulates a standard http.Client and a base url. Such a client can be created inside a function or by initializing a package variable for shared access. Using a client, you can send http requests and call multiple expectation functions on each response. Most functions of the forest package take the *testing.T variable as an argument to report any error. Example To compose http requests, you create a RequestConfig value which as a Builder interface for setting the path,query,header and body parameters. The ProcessTemplate function can be useful to create textual payloads. To inspect http responses, you use the Expect functions that perform the unmarshalling or use XMLPath or JSONPath functions directly on the response. If needed, implement the standard TestMain to do global setup and teardown. In contrast to the standard behavior, the Body of a http.Response is made re-readable. This means one can apply expectations to a response as well as dump the full contents. The function XMLPath provides XPath expression support. It uses the [https://godoc.org/launchpad.net/xmlpath] package. The similar function JSONPath can be used on JSON documents. Colorizes error output (can be configured using package vars). All functions can also be used in a setup and teardown as part of TestMain. (c) 2015, http://ernestmicklei.com. MIT License
16 versions
Latest release: about 3 years ago
1 dependent package

View more package details: https://packages.ecosyste.ms/registries/proxy.golang.org/packages/github.com/emicklei/forest

View more repository details: http://repos.ecosyste.ms/hosts/GitHub/repositories/emicklei%2Fforest

Dependent Repos 2

emicklei/landskape
general purpose webservice for the registation of applications and their connections

Size: 17.8 MB - Last synced: about 1 month ago - Pushed: almost 7 years ago

easeml/automl
A Scalable Auto-ML System

Size: 34.5 MB - Last synced: 15 days ago - Pushed: over 2 years ago