Skip to content

xchem/fragalysis-stack-behaviour-tests

Repository files navigation

fragalysis-stack-behaviour-tests

Conventional Commits pre-commit Code style: black Packaged with Poetry

GitHub Tag

latest stack test

A repository of (experimental) Python-based end-2-end behaviour tests using playwright for UI-based testing of the Fragalysis Stack, and behave for cucumber-like testing of the API.

If you want any login/authentication logic to work the Fragalysis Stack that's under test must be known to the authentication system (Keycloak) using a suitable keycloak client ID and secret (which must be provided in the corresponding BEHAVIOUR_ values).

Contributing

The project uses: -

You MUST comply with these choices in order to contribute to the project.

To get started review the pre-commit utility and the conventional commit style and then set-up your local clone by following the Installation and Quick Start sections: -

poetry shell
poetry install --with dev
pre-commit install -t commit-msg -t pre-commit

Now the project's rules will run on every commit, and you can check the current health of your clone with: -

pre-commit run --all-files

Getting started

You will need Python (ideally 3.11 or better) and poetry.

Create a suitable Python environment: -

poetry shell
poetry install

Many tests rely on sensitive information that's made available through various BEHAVIOUR_ environment variables. The tests should tell you what you need to provide if something's missing.

As a one-time setup, install the playwright dependencies: -

playwright install

Running the behaviour tests

To run the stack behaviour tests run behave from the behaviour directory: -

push behaviour
behave

For further information read bdd/README.md

Running the UI tests

Run the tests from the project root or playwright directory using pytest: -

pytest

About

A repository of (experimental) BDD tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published