Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lensvol/towel
A tool for API testing
https://github.com/lensvol/towel
Last synced: 13 days ago
JSON representation
A tool for API testing
- Host: GitHub
- URL: https://github.com/lensvol/towel
- Owner: lensvol
- Created: 2015-03-17T14:31:18.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-17T15:09:05.000Z (almost 10 years ago)
- Last Synced: 2024-11-10T13:12:54.546Z (2 months ago)
- Language: Python
- Size: 104 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# towel
A tool for API testingThe original idea and first implementation belongs to Ivan Shvedunov (aka ivan4th). Unfortunately due to license issues the
original towel could not be opensourced, so this is a different implementation inspired by the original project."A towel, [The Hitchhiker's Guide to the Galaxy] says, is about the most massively useful thing an interstellar hitchhiker can have."
Towel is a simple tool that saves a lot of time writing/supporting/figuring what the hell got wrong when you are dealing
with API tests.The algo is pretty simple:
First, a towel.xml file is created. That's the file with a test scenario that has the following form:
```xml...
```
Currently supported request types are:
* setupA special request type. It executes the script stored in 'request-data' param.
Use it to set up test environment, initialize databases and start servers.
* get
* postThe requests are carried out one by one. Each request is sent to the server, then the received result is parsed, normalized
and compared with the previously recorded one. If any differences are found, a test is marked as FAILED, the diff is
logged and the actual result is stored in a 'test_file_name.out.tmp' file. Otherwise the test has PASSED.The test case is run by
```bash
python towel.py -a -p run
```
If after the test run you are ok with the output produced by towel, you can fixate the result for future comparison with
```bash
python towel.py fixate
```