ntest
ntest is a cross-platform cli app that runs multiple tests against any address.
About ntest
Having the ability to run common tests against any domain often comes in quite handy. ntest
aims to provide you with the most necessary tests you would want to run against a domain. It currently performs the following tests: https redirect, certificate expiration, average round-trip time, measure packet-loss and DNS host look-up.
Installation
Binaries
If you prefer grabbing ntest
its binaries, download the latest from the the GitHub releases page.
Brew
❯ brew tap bschaatsbergen/ntest
❯ brew install ntest
Usage
Using ntest
is fairly simple. You only need to provide the address by using the -a
flag, doing so will already allow you to perform all the tests.
❯ nstest -a bschaatsbergen.com
See the other optional flags below.
❯ ntest -h
ntest - run multiple tests against any ip or address 🩺
Usage:
ntest [flags]
Flags:
-a, --address string ip or address to perform tests against
-d, --debug set log level to debug
-h, --help help for ntest
--packet-count int amount of packets that should be sent (default 1)
ntest
in action:
❯ ntest -a bschaatsbergen.com
INFO[0020] Round-trip time: 13ms
INFO[0036] HTTPS redirect detected
INFO[0036] Certificate for bschaatsbergen.com, *.bschaatsbergen.com expires in 186 days
INFO[0036] DNS hosts: 52.222.138.52, 52.222.138.100, 52.222.138.23, 52.222.138.36
It's also possible measure the average round-trip time by sending multiple packets. Additionally, adding the -d
flag allows you to see the debug logs regarding the packets.
❯ ntest -a bschaatsbergen.com --packet-count 5 -d
DEBU[0000] Parsed address: bschaatsbergen.com
DEBU[0000] Sending 5 packets to: bschaatsbergen.com
DEBU[0004] Packets: Sent = 5, Received = 5, Lost = 0 (0% loss)
INFO[0004] Round-trip time: 14ms
...
Contributing
If you have a suggestion that would make ntest
better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
License
This project is licensed under the MIT License - see the LICENSE file for details.