Make RESTful HTTP More Easy
gmeter customizes HTTP RESTful clients and HTTP RESTful servers and runs them by configuration. With variable and command system supports, json acts as a script language to process HTTP request and response.
- test case configure with json;
- gmeter environment variables access and fantastic embedded command system with pipeline support;
- test control over specified count or iterable command
- concurrency
- test pipeline
- customized response checking and reporting
- proxy support
- performance monitoring, QPS limiting(under development)
- json compare based on template(under development)
- arithmatic and logical expressions support.
go get github.com/forrestjgq/gmeter
It will be installed into $GOBIN(if it's empty, get from go env $GOBIN
). It requires you've got a GO environment.
Or you may directly install to /usr/local/bin:
curl -sf https://gobinaries.com/forrestjgq/gmeter | sh
root permission may be required to install.
gmeter [options] <config>[, <config>, ...]
<config>
is a file path, it could be
- A json file path(end with .json), a sample can be get here, see Configuration, or
- A list file, each line contains a file path ends with .json will be treated as a gmeter configuration and will be called. If it is an relative path, it's related to <config>
's directory. In a line, #
is considered to be start of comment, any thing after (and include) #
will be ignored. Empty line is allowed.
- A directory, any .json file in this directory and sub-directories of this directory will be treated as a test configuration and will be called.
Optional arguments includes:
-t, -template <config>
: load an HTTP client template configuration.<template-config>
is a configure json file used as a base configuration. If this argument is present, the Hosts/Messages/Tests/Env/Options will be copied to all<config>
if target configuration does not define those items identified by the key of map. An example could be find in template and configuration, and the command line would begmeter -template example/base.json example/sep.json
.-httpsrv <http-server-config>
: start an HTTP server.<http-server-config>
is configure json file path for creating http server, a sample can be get here, see HTTP Server Configuration for more information.-e="k1=v1 k2=v2 ..."
: predefined global variables. Each variable is defined inkey=value
form, and multiple key value pairs are seperated by spaces.-call <commandline>
: command line called before any config is executed and after any server is started.-f <final>
: final config called even running fails.-gm <port>
: set GoMark HTTP port, default 7777.-fs <path:port>
: enable a file server for local file system<path>
using HTTP server on port<port>
- Guideline: A guideline explains with examples for you to ease into gmeter:
- Configurations: godoc for configuration description
- Command: gmeter command system and manual
- Json Compare: Json compare manual.
- gomark support
- better logging