Pytest-web-ui

Latest version: v1.4.0

Safety actively analyzes 621907 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

2.0.0

For V2, I have completely updated how and when the test tree is created and modified in the backend to support a more dynamic workflow. Previously, the test tree would only be collected once at the start and then the structure would be fixed for the lifetime of the process. Although the changes to a particular testcase would be picked up, you could not add (or remove) testcases, files or directories and see them reflected in the UI. A side-effect of the static design meant that syntax errors when collecting tests were not handled well or recoverable from without restarting the app.

Now, the test tree is a much more dynamic structure and allows testcases to be added, removed or modified in any way you please. Any errors during collection (e.g. due to a syntax error) will be caught and noted in the UI. The idea is to allow the UI to be much more reactive to changes made during development: simply start the UI once, and you can incrementally add, run and update tests as part of your development cycle without ever having to restart the app.

The other big change with V2 is the name. I felt that "pytest_web_ui" places unnecessary emphasis on the implementation detail of the UI being a web app, when it could easily have been implemented in some other way (e.g. an electron app) and keep the same purpose. Further, I thought that the name might cause some confusion if people thought it was a tool to help specifically with testing web UIs, which it isn't! I liked the name "pytest_commander" because that reflects what the app is doing - commanding pytest for you, so you can run tests and view the results in a few clicks instead of by typing terminal commands.

Give it a go and let me know any feedback via issues or email!

1.3.1

Adds requests package to the setuptools dependencies used for pip installs.

1.3.0

- Add slider to UI to allow manual control of docker-compose environments.
- Bugfix: don't crash when non-test .py files are present in the test directory

1.2.0

- Present directory hierarchies correctly in the UI and use correct short IDs to avoid duplication.
- Explicitly call docker-compose down during cleanup.

1.1.0

- Add multiprocessing on the backend. Each test run triggered by a click in the UI now spawns a new process to run the test. Not only does this allow multiple tests to be run in parallel and means that tests do not block the HTTP/websocket server, this change also ensures that tests modules are loaded fresh every time and prevents strange bugs that can occur due to stale pytest state in the main process.
- Automatically start and stop environments defined inside a `docker-compose.yml` file in the base directory used for test discovery. The docker environment is started when the pytest_web_ui backend process starts and stopped before it exits due to Ctrl-C interrupt.
- Reorganise the web UI navigation to include an entry representing the root node. This allows all tests to be run via a single click in the UI.
- Update JS dependencies.

1.0.0

First release of PyTest web UI. Includes the basic functionality:

- Browse and run your tests from the web app.
- Select a port and enable debug mode from command-line parameters.
- Web app is automatically opened in the default web browser.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.