This repository generates the VCR.py cassettes for Ultimate Sitemap Parser's integration and performance tests.
Cassettes are recordings of HTTP requests and responses which mean the tests can run faster and without causing excessive strain to servers.
If you just want to run the integration and performance tests of Ultimate Sitemap Parser, you don't need to use this repository directly. Within the main repository for USP there are scripts to download cassette files.
Prerequisites:
- Install the environment through Poetry
To upload cassettes for sharing, you will also need:
- The GitHub CLI, signed in to an account with write access to this repo
Cassettes are generated through the following process:
- Run
python generate.py [--upload] https://example.org
- USP is run within a VCR.py context to record and save HTTP requests and responses
- The VCR cassette is saved to
out/example.org.yaml
- If the
--upload
argument is omitted, the program stops here
- If the
- The cassette is gzipped to
out/example.org.yaml.gz
and hash calculated- If the hash is the same as the version in the manifest, the program stops here
- A new GitHub release is created with the tag
yyyymmddhhmmss-example.org
example.org.yaml.gz
is attached to the release as an asset- The download URL of the asset and its hash are updated in
manifest.json
- Now commit and push the new version of
manifest.json