Releases: ryanc414/pytest_commander
Remove dependence on pipenv from build script
build script only requires npm to build the web client
Fix up release workflow
Fix a bug in the release workflow which meant that the web client was not being included with the package.
Fix bug with modified test files
After files are modified, collect them in a separate process to ensure we aren't getting the cached results from the previous collection.
Watch for filesystem changes in background
Watch for filesystem changes and update our state tree to match. Allows a better iterative cycle - create, modify or delete tests and see it immediately reflected in the UI without having to restart.
Bugfixes related to state tree update and handling of collection failures.
Minor UI improvements
- Improve responsiveness of UI when running tests
- Change page title to "PyTest Commander"
V2: fully dynamic test tree, rename, bug fixes
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!
Fix up dependencies
Adds requests package to the setuptools dependencies used for pip installs.
Add environments slider and bugfixes
- 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
Present test directory hierarchies
- Present directory hierarchies correctly in the UI and use correct short IDs to avoid duplication.
- Explicitly call docker-compose down during cleanup.
Multiprocessing, docker-compose and UI update
- 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.