Skip to main content

reqman4 (prototype), command 'rq'

Project description

Reqman4

Package version

A complete rewrite of reqman. It's a prototype/poc ! Don't know yet if it will replace the original, but I wanted to have a new/cleaner/simpler version, with all good ideas from the original.

MAJOR REASONS: This prototype is more python based for vars & tests, and can display html in http-verb's doc (to be able to make human readable html reports). Syntax is simpler/cleaner (to be able to have a json-schema to valid yml/rml). And debugging is simpler. Switch mechanism is simpler (and no more trouble with defaults, coz the first switch is selected by default). Reqman conf is now "reqman.yml".

Currently, the package provide a rq command (but will be reqman in the future)

Here is the JSON SCHEMA of the new scenario (DSL)).

Major technical differences :

  • licence gnu gpl v2 -> MIT
  • "uv" & (a lot) simpler (less features)
  • use httpx !
  • options are inverted (--i -> -i & (switch) -dev --> --dev)
  • step operator is always in uppercase (SET, CALL, 'VERB-HTTP' ).
  • reqman.conf -> reqman.yml, renamed !
  • switch mechanism based on "--key" in reqman.yml / scenars ... first one will be the default
  • scenars(*.yml) & reqman.yml are yaml/dict only !
  • scenars must(/can for compat) have a "RUN:" section (others keys are the global env)
  • tests are simple python statements
  • no break!
  • no if
  • no more .BEGIN/.END
  • no more RMR
  • no more comparison side by side
  • no more XML testing (may change)
  • no more junit.xml output (may change)

Here is a valid scenario, which give you an overview : scenario.yml

If you use uvx, you cant test this scenario in your context :

uvx reqman4 https://raw.githubusercontent.com/manatlan/reqman4/refs/heads/main/scenario.yml -o

It will open an html report in your default browser, and you can easily check what's going ...

From github

to test command line

uvx --from git+https://github.com/manatlan/reqman4 rq --help

to run a scenario

uvx --from git+https://github.com/manatlan/reqman4 rq scenario.yml -o

From pypi

to test command line

uvx reqman4 --help

to run a scenario with a local scenario

uvx reqman4 scenario.yml -o

For jules

This project use "uv":

  • use "uv sync --dev" to setup the ".venv"
  • use "uv run pytest" to validate all unittests

reqman4 built with nuitka

To test, create file cmdline.py

from src.reqman4 import main
if __name__=="__main__":
    main.command()

and in console:

uv pip install nuitka
uv run nuitka cmdline.py 

it will produce a executable cmdline.bin, which works !

Majors changes from reqman3

If you come from reqman v3

rename reqman.conf to reqman.yml

now, the conf is in an yml file

translate "switchs"

...
switchs:
    env1:
        doc: test the env 1
        root: http://localhost
...

to

...
--env1:
    doc: test the env 1
    root: http://localhost
...

It's simpler, clearer ... and the first one will be auto-selected (if nos supplied) as the default one !

everything in <<var>> or {{var}} is python3 evaluated

no more "own substitution language" ... everything is python3

...
- GET: /path?var=<<value|method>>
  doc: test
...

to

...
- GET: /path?var=<<method(value)>>
  doc: test
...

tests are python3 evaluated

no more "own test language" ... everything is python3

...
- GET: /path
  tests:
    - json.value: "toto"
...

to

...
- GET: /path
  tests:
    - R.json.value == "toto"
...

R is always the last http response.

"call" is now "CALL"

todo ...

no more "save" in http or call

use a new step SET, like that

...
- GET: /path
  tests:
    - R.json.value == "toto"

- SET:
    saved_value: <<R.json.value>>
...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reqman4-0.5.5.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reqman4-0.5.5-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file reqman4-0.5.5.tar.gz.

File metadata

  • Download URL: reqman4-0.5.5.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reqman4-0.5.5.tar.gz
Algorithm Hash digest
SHA256 c241892cfcbc5a8e60dfe5d721e57ebf556de8c5b5f3074b754896d809efd0fe
MD5 3c1e56230abada09142320739289c379
BLAKE2b-256 8ab966ce85933292a7f586c9e25d1050c003382af9e99c1f4aed47fcd881bad8

See more details on using hashes here.

Provenance

The following attestation bundles were made for reqman4-0.5.5.tar.gz:

Publisher: publish_on_pypi.yml on manatlan/reqman4

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file reqman4-0.5.5-py3-none-any.whl.

File metadata

  • Download URL: reqman4-0.5.5-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reqman4-0.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4c040550425c2ba57ed29c9d0191dd95581d6b8e1d72f1fc0e605d3f7f39bd5b
MD5 094c1ec1818407714b96d35b32eb70a0
BLAKE2b-256 b546b8fd2976097f1cc5f0e59df4f713e8ad535b59c4a5c95f3557495b211731

See more details on using hashes here.

Provenance

The following attestation bundles were made for reqman4-0.5.5-py3-none-any.whl:

Publisher: publish_on_pypi.yml on manatlan/reqman4

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page