Skip to content
/ ammo Public
forked from greggyNapalm/ammo

Generators for input data for load testing

Notifications You must be signed in to change notification settings

maklaut/ammo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ammo: Load testing input data generators

Installation

Use pip and vurtualev/virtualenvwrapper

from PyPI

pip install ammo

from GitHub

pip install -e git+git://github.com/greggyNapalm/ammo.git#egg=ammo

Example

>>> from ammo.phantom import HttpCompiler
>>> HttpCompiler.version
'3.1'
>>> hc = HttpCompiler(method='GET', headers={'Host': 'httpbin.org'})
>>> hc.build_phantom('/some/path')
'73\nGET /some/path HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: httpbin.org\r\n\r\n\n'
>>>
>>> hc.build_phantom('/other/path')
'74\nGET /other/path HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: httpbin.org\r\n\r\n\n'
>>>
>>> hc.build_phantom('/api/v1.0/resource', method='POST', body='{"a": "b"}',
...                  headers={'Host': 'httpbin.org', 'Content-type': 'application/json'})
'148\nPOST /api/v1.0/resource HTTP/1.1\r\nAccept-Encoding: identity\r\nContent-Length: 10\r\nHost: httpbin.org\r\nContent-type: application/json\r\n\r\n{"a": "b"}\r\n\r\n\n'

Requirements

  • GNU Linux
  • Python >= 2.7 (Not Python3)

About

Generators for input data for load testing

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%