This is a simple test suite which runs some black-box tests on a given website. It's designed to provide sanity checks as part of a post-deployment workflow.
Further Reading: http://en.wikipedia.org/wiki/Black-box_testing
This software was designed with the following considerations in mind:
- It should be run via a Github action.
- It should take a single required argument, a hostname, and not require any further information about a given domain.
- The tests should behave well, so as to not overwhelm the application server.
- This should report to a Slack webhook.
- It might be worth investigating changing from
unittest
-derived tests to something lighter with pytest.
- pytest, for use as a nicer test runner than UnitTest.
- BeautifulSoup4
As part of a Github workflow.yml
file:
- name: Run live site checks
uses: giantmade/giant-blackbox
with:
hostname: "https://www.example.com"
verify_ssl: "True"
The first version of this code was written in Leon Smith's gist. Everything since then has been rearranging code around the edges. Thank you Leon.