- Move external URL checks to its own module under `tests/`. This separates them from integration test, addressing long runs and frequent failures that led to ignoring test results. - Move `check-desktop-runtime-errors` to `tests/checks` to keep all test-related checks into one directory. - Replace `ts-node` with `vite` for running `check-desktop-runtime-errors` to maintain a consistent execution environment across checks. - Implement a timeout for each fetch call. - Be nice to external sources, wait 5 seconds before sending another request to an URL under same domain. This solves rate-limiting issues. - Instead of running test on every push/pull request, run them only weekly. - Do not run tests on each commit/PR but only scheduled (weekly) to minimize noise. - Fix URLs are not captured correctly inside backticks or parenthesis.
1.1 KiB
1.1 KiB
check-desktop-runtime-errors
This script automates the processes of:
- Building
- Packaging
- Installing
- Executing
- Verifying Electron distributions
It runs the application for a duration and detects runtime errors in the packaged application via:
- Log verification: Checking application logs for errors and validating successful application initialization.
stderrmonitoring: Continuous listening to thestderrstream for unexpected errors.- Window title inspection: Checking for window titles that indicate crashes before logging becomes possible.
Upon error, the script captures a screenshot (if --screenshot is provided) and terminates.
Options
--build: Clears the electron distribution directory and forces a rebuild of the Electron app.--screenshot: Takes a screenshot of the desktop environment after running the application.
This module provides utilities for building, executing, and validating Electron desktop apps. It can be used to automate checking for runtime errors during development.
Configs
Configurations are defined in config.ts.