jmeter-jtl-parser

command module
v0.0.0-...-c2a90f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 7 Imported by: 0

README

Jmeter JTL Parser

Go Report Card | Go Tests

Stream decode JMeter JTL (xml-format) files and output them as XML, CSV, JSON, HTTP JSON.

Parse JMeter xml-format JTL files to "anything", supporting:

  • Nested samples
  • JMeter custom variables
  • Responses
  • Assertions
  • Cookies
  • More...

The parser is a stream decoder, meaning it's safe to use for very large jtl files.

Usage

❯ ./bin/jtl-parser-linux -h
Usage: jtl-parser-linux [--output OUTPUT] [--mergedfiles MERGEDFILES] [--reportcenterapihost REPORTCENTERAPIHOST] FILENAME

Positional arguments:
  FILENAME

Options:
  --output OUTPUT, -o OUTPUT
                         specify the output type, valid options: csv,xml,json,http [default: http]
  --mergedfiles MERGEDFILES, -f MERGEDFILES
                         merge jtl files
  --reportcenterapihost REPORTCENTERAPIHOST, -h REPORTCENTERAPIHOST
                         transfer jtl data to JSON, and post it to report center. [default: http://localhost:8080/jmeter]
  --help, -h             display this help and exit

Examples

git clone git@github.com:yeshan333/jmeter-jtl-parser.git
cd jmeter-jtl-parser
# compile bin file
make
# transfer to csv
./bin/jtl-parser-linux --output csv tests/github-etcd.jtl
# transfer to json
./bin/jtl-parser-linux --output json tests/github-etcd.jtl
# mmerge mutiple xml-format jtl files (3 files)
./bin/jtl-parser-linux --output csv tests/github-etcd.jtl --mergedfiles tests/github-etcd.jtl tests/github-
etcd.jtl

Output Formats

  • XML

  • JSON

  • CSV

  • HTTP JSON: for custom test report center show test data

Parse Validating

Output/Input XML is not in canonical format, in order to diff them, use the included compare.sh script:

$ ./compare.sh tests/github-etcd.jtl

Acknowledgements

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL