zerocheck 0.1.10 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +98 -3
- package/dist/index.js +6433 -0
- package/package.json +46 -7
- package/index.js +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Zerocheck
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,100 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Zerocheck
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Repeatable browser tests from your release checklist**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Zerocheck turns your team's manual release checklist into saved end-to-end browser tests. Start with the important user journeys, review the test definitions and browser results, and rerun the checks as your app changes.
|
|
6
|
+
|
|
7
|
+
This is the Zerocheck CLI. Use it to run your repository tests in a browser on your laptop or in CI.
|
|
8
|
+
|
|
9
|
+
**New to Zerocheck? [Request pilot access](https://tryzerocheck.com/demo/).** We provision a customer instance and help you configure your first handful of tests during hands-on onboarding.
|
|
10
|
+
|
|
11
|
+
**Already onboarded?** [Run your saved tests](#run-your-saved-tests), or open the instance URL supplied during onboarding to use the web app.
|
|
12
|
+
|
|
13
|
+
## How it works
|
|
14
|
+
|
|
15
|
+
Your Zerocheck instance makes every decision: it reads each test, chooses each browser action, checks each expected outcome and keeps the results. This CLI drives a Chromium browser on your machine for the instance and keeps your test secrets on your machine.
|
|
16
|
+
|
|
17
|
+
## Before you start
|
|
18
|
+
|
|
19
|
+
Test execution requires a Zerocheck account, a provisioned customer instance and a project in that instance. **There is no default public service.**
|
|
20
|
+
|
|
21
|
+
Have these ready:
|
|
22
|
+
|
|
23
|
+
- **Node.js 20.19 or newer.**
|
|
24
|
+
- **Your instance URL** and account access, supplied during onboarding.
|
|
25
|
+
- **Your project files:** `zerocheck.yaml` with the correct project, environment and app URL, plus at least one saved YAML test in its configured test directory. We set up these files with you during onboarding.
|
|
26
|
+
- **A running app** reachable from your machine, with the test accounts and credential variables your tests need.
|
|
27
|
+
|
|
28
|
+
## Run your saved tests
|
|
29
|
+
|
|
30
|
+
Run from the app repository containing the project files above. Replace the instance URL with the one you received during onboarding.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install --save-dev --save-exact zerocheck@0.2.0
|
|
34
|
+
npx playwright install chromium
|
|
35
|
+
export ZEROCHECK_API="https://your-instance.example.com"
|
|
36
|
+
npx zerocheck login
|
|
37
|
+
npx zerocheck run --json .zerocheck/latest-run.json
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`playwright install chromium` downloads the browser that the CLI drives. `login` prints a URL and a code for you to approve in your browser; `whoami` shows the instance and project you are signed in to, and `logout` signs this machine out. In CI, set `ZEROCHECK_API` and a project token from Settings as `ZEROCHECK_TOKEN` instead of signing in.
|
|
41
|
+
|
|
42
|
+
`run` executes the saved tests in the configured test directory, using `default_environment` from `zerocheck.yaml`. Confirm that environment points to the app you intend to test. It prints each test's result and a results link; open it to inspect the steps, screenshots and recordings after signing in. `--json` also writes the run record to a file.
|
|
43
|
+
|
|
44
|
+
To run just one test, use its actual repository path:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx zerocheck run zerocheck/tests/your-test.yaml
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Options: `--env <name>` chooses another environment from `zerocheck.yaml`, `--headed` shows the browser, `--fail-on-flaky` fails a test that passed only after a retry, and `--project-dir <dir>` runs a project in another folder.
|
|
51
|
+
|
|
52
|
+
## Test secrets stay on your machine
|
|
53
|
+
|
|
54
|
+
Reference each secret in `zerocheck.yaml` as an environment variable and set that variable where the CLI runs:
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
environments:
|
|
58
|
+
dev:
|
|
59
|
+
url: http://localhost:3000
|
|
60
|
+
secrets:
|
|
61
|
+
PASSWORD: ${APP_TEST_PASSWORD}
|
|
62
|
+
login_steps:
|
|
63
|
+
- Enter "{{credential:PASSWORD}}" into "Password"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The CLI sends the instance each secret's name, never its value, and types the value itself only where the test refers to it. A missing variable stops the run before it starts. A test or login step that writes out a configured secret value is refused before anything is sent: use a reference instead. Runs that use secrets are not recorded on video.
|
|
67
|
+
|
|
68
|
+
The instance receives the selected test files, the environment's settings without secret values, and what the browser shows while the tests run: page snapshots, screenshots, recordings and console messages.
|
|
69
|
+
|
|
70
|
+
## What a test looks like
|
|
71
|
+
|
|
72
|
+
Each repository test is a readable YAML file. Adapt this example to a route and outcome that exist in your app:
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
version: zerocheck/v1
|
|
76
|
+
name: Release notes are available
|
|
77
|
+
blocks_merge: true
|
|
78
|
+
steps:
|
|
79
|
+
- Navigate to /releases
|
|
80
|
+
- Verify the Release notes heading is visible
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
To bring a test you made in the web app into your repository, use **Download YAML** and put that file in the configured test directory. This creates an independent copy.
|
|
84
|
+
|
|
85
|
+
## When a run needs attention
|
|
86
|
+
|
|
87
|
+
| Situation | Next step |
|
|
88
|
+
| --- | --- |
|
|
89
|
+
| No instance configured | Set `ZEROCHECK_API` to your customer instance before signing in. |
|
|
90
|
+
| No configuration or tests found | Add the project configuration and saved YAML tests. |
|
|
91
|
+
| Missing test secrets | Set the environment variables your configured environment references. |
|
|
92
|
+
| A test fails or cannot complete | Open the results link and inspect the failed step and its evidence. |
|
|
93
|
+
| Your instance is running as many runs as it allows | Try again shortly. |
|
|
94
|
+
| The run is not finished on your instance | Run `zerocheck run` again in the same folder: it finishes the earlier run first, then runs the tests you asked for. |
|
|
95
|
+
|
|
96
|
+
Press Ctrl-C once to cancel a run: the browser closes and your instance is told. A cancelled run never resumes. If the instance could not be told, or you pressed Ctrl-C again to stop waiting, the next `run` in the same folder tells it first. The CLI keeps this state in a `.zerocheck` folder in your project, which it excludes from Git.
|
|
97
|
+
|
|
98
|
+
Exit codes: **0** means every blocking test passed; **1** means a blocking test failed, or with `--fail-on-flaky` passed only after a retry; **2** means the run could not give a verdict: a setup or secret problem, a refused start, a cancellation, or a run that could not finish.
|
|
99
|
+
|
|
100
|
+
[Request pilot access](https://tryzerocheck.com/demo/) · [Developer resources](https://tryzerocheck.com/developers/) · [CLI guide](https://tryzerocheck.com/cli/) · [Web app guide](https://tryzerocheck.com/docs/web-app/) · [Results](https://tryzerocheck.com/docs/results/)
|