Zerxes is a CLI tool that helps with automation testing of HTTP redirects.
From any directory, you can run:
$ npx @zerxes [args]
You can specify options through the command line (CLI).
CLI | Description | Default Value | Example |
---|---|---|---|
in |
Input file with valid test cases | --in=./test-cases.xlsx |
|
out |
Output file with test results | --out=./output.xlsx |
|
maxHops |
Maximum HTTP hops before failure | 10 | --maxHops=10 |
concurrency |
Maximum concurrent tests | 20 | --concurrency=20 |
Zerxes currently currently only supports CSV and XLSX files for input.
When receiving an XLSX file as input, the input file should be structured as follows (without headers):
- Column 1: The URL to start from (ex:
http://google.com
) - Column 2: The expected URL to be redirected to (ex:
http://www.google.com
) - Column 3: The maximum hop count for the redirect (ex:
2
). Optional, leave blank to use default value.
http://google.com |
http://www.google.com |
|
http://yahoo.com |
https://www.yahoo.com |
5 |
When receiving an CSV file as input, the input file should be structured as follows (without headers):
- Column 1: The URL to start from (ex:
http://google.com
) - Column 2: The expected URL to be redirected to (ex:
http://www.google.com
) - Column 3: The maximum hop count for the redirect (ex:
2
). Optional, leave blank to use default value.
http://www.google.com,http://www.google.com
http://www.yahoo.com,https://www.yahoo.com,5
Zerxes currently currently only supports CSV and XLSX files for output. Both formats will display the following table:
maxHops | url | expectedRedirect | success | hops |
---|---|---|---|---|
10 |
http://google.com |
http://www.google.com |
TRUE | 1 |
5 |
http://yahoo.com |
https://www.yahoo.com |
TRUE | 1 |
Call from CLI:
npx zerxes --in=./test/data/test.csv --out=./output.csv --maxHops=5
node index.js --in=./test/data/test.csv --out=./output.csv --maxHops=5
Install globally and run:
npm i -g zerxes
zerxes --in=./test/data/test.csv --out=./output.csv --maxHops=5