GFRAST
GFRAST (GAMS Flexible Repository Assertion Tool) is a small wrapper around the Twill HTTP testing client. It lets you run repeatable, script-driven checks against a web server and summarize the results in a machine-friendly way.
The main difference from using Twill directly is that GFRAST filters and normalizes its output so it can be consumed by other tools or custom clients. The current CLI provides a simple, focused interface for running scripts and writing a JSON summary.
Installation
GFRAST is available on PyPI and can be installed with common package managers:
pip install gfrast
uv add gfrast
If you use uv and only want to run GFRAST temporarily, you can do so without a
permanent install:
uvx gfrast --help
Usage
GFRAST executes Twill script files. These are plain text files that describe the HTTP checks to run.
A minimal example script, example.twill, might look like this:
go /foo/bar
code 200
find "foobar"
This loads /foo/bar from the configured base URL and asserts that the response has
status code 200 and contains the text foobar.
To run a script:
gfrast example.twill
By default, GFRAST uses https://gams.uni-graz.at as the base URL. You can override
that with -u / --baseurl:
gfrast -u https://example.com example.twill
You can run multiple scripts by passing several files:
gfrast -u https://example.com example1.twill example2.twill
Or you can point GFRAST to a directory. It will recursively run all .twill files
inside that directory:
gfrast -u https://example.com my_scripts
This is especially useful for organizing tests by project or repository section.
Command-line options
The CLI supports the following options:
-u,--baseurl <URL>: Set the base URL prepended to eachgocommand.-w,--workers <INTEGER>: Number of worker processes to use. Default is1.--log-level <STRING>: Set the log level (ERROR,WARNING,INFO,DEBUG).--logfile <PATH>: Path for the JSON summary log file. Default isgfrast.log.json.--no-log: Disable writing the JSON summary file.
Script files
A Twill script is just a plain text file that controls the client.
Example:
go /foo/bar
code 200
find "foobar"
The first line (go /foo/bar) issues the request. The base URL is prepended before
sending the request. For example, with --baseurl https://example.com, this becomes:
https://example.com/foo/bar
The next line (code 200) asserts that the response status is 200.
The third line (find "foobar") asserts that the response body contains the string
foobar.
For more advanced behavior, Twill supports a wide range of commands for forms, cookies, redirects, and more. See the official Twill docs: https://twill.readthedocs.io/en/latest/commands.html
Frequently used script commands
go <PATH>
This is usually the first command in a script. Most other commands operate on the
result of the last go request.
go /foo/bar
code 200
find "foobar"
When the base URL is set, go values are automatically expanded to full URLs.
code <INT>
Asserts that the response status matches the given integer.
code 200
find <PATTERN> [<FLAGS>]
Checks whether the response contains the given pattern.
find "foo"
This supports regular expressions and flags such as i (ignore case) and m
(multiline). It can also be used with XPath via the x flag.
Example:
find "//xhtml:input/@id[.='query']" x
not_find
Asserts that a pattern does not appear in the response.
url <PATTERN>
Asserts that the current page URL matches a given pattern. This is especially useful for redirect tests.
title <PATTERN>
Asserts that the page title matches the supplied pattern.
header <NAME>[<PATTERN>]
Checks that an HTTP header has the expected value.
echo
Prints a string to the output stream.
info
Displays information about the current page for debugging.
show
Prints the current page content for debugging.
Development
The git.uni-graz.at server is only a mirror for the private repository, where the development takes place.
Metadata
Release files for gfrast 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gfrast-0.3.1.tar.gz | 9.8 kB | Without provenance | Details for gfrast-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gfrast-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for gfrast-0.3.1-py3-none-any.whl |
Total release size: 20.4 kB
Release files / gfrast-0.3.1.tar.gz
| Download URL | gfrast-0.3.1.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83d8a7f485e63d92d25e31402464d5ae29fa5a157c25eebe084d2e5b265fdb14
|
|
BLAKE2b-256 checksum How to use checksums |
45162311b16ec7237ee81b2e4f5e0911cf6e42ba4726221b9a62fe04a3ab626d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / gfrast-0.3.1-py3-none-any.whl
| Download URL | gfrast-0.3.1-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4aa74a5c9fbef7921d03cc4c905e46400b515bdd2310144f28e95c5b5fa7f433
|
|
BLAKE2b-256 checksum How to use checksums |
f88966eb3e55aa508991a3119f71556b6f8e46668ecc14d07ca1e44e29890c5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for gfrast 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.