File tree Expand file tree Collapse file tree 3 files changed +22
-12
lines changed Expand file tree Collapse file tree 3 files changed +22
-12
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ For managing these images:
3232
3333 - ` image-download ` : Download selected or all test images
3434 - ` image-create ` : Create test machine images from scratch (usually through
35- virt-install or downloading a cloud image), with common build and test
36- dependencies for Cockpit projects preinstalled
35+ downloading a cloud image), with common build and test dependencies for
36+ Cockpit projects preinstalled
3737 - ` image-upload ` : Upload a locally built test image to the official image servers
3838
3939For running and debugging the images:
Original file line number Diff line number Diff line change @@ -152,10 +152,26 @@ which will output a URL to connect to with a browser, such as
152152< http://localhost:8765/qunit/base1/test-dbus.html > . Adjust the path for different
153153tests and inspect the results there.
154154
155- You can also run individual tests by specifying the ` TESTS ` environment
156- variable :
155+ QUnit tests are run as part of a pytest test called ` test_browser ` . You can
156+ run individual tests via ` pytest -k ` , like so :
157157
158- make check TESTS=qunit/base1/test-chan.html
158+ pytest -k test-fsinfo.html
159+
160+ You can see JavaScript code coverage information for QUnit tests. For a
161+ summary table:
162+
163+ pytest -k test_browser --js-cov
164+
165+ And for detailed output on uncovered sections in a specific file, something
166+ like:
167+
168+ pytest -k test-fsinfo.html --js-cov-files='*/fsinfo.ts'
169+
170+ Coverage information is gathered into the pytest tmpdir, regardless of which
171+ coverage-related commandline flags are given, so it's also possible to drill
172+ down after the fact — without re-running tests — using something like:
173+
174+ test/common/js_coverage.py -m '*/fsinfo.ts' /tmp/pytest-of-*/pytest-current/js-coverage/*
159175
160176There are also static code and syntax checks which you should run often:
161177
Original file line number Diff line number Diff line change @@ -172,21 +172,15 @@ You can set these environment variables to configure the test suite:
172172 "centos-10"
173173 "debian-stable"
174174 "debian-testing"
175- "fedora-39"
176175 "fedora-40"
177176 "fedora-coreos"
178177 "rhel-9-4"
179- "rhel4edge",
180178 "ubuntu-2204"
181179 "ubuntu-stable"
182- "fedora-39 " is the default (TEST_OS_DEFAULT in bots/lib/constants.py)
180+ "fedora-40 " is the default (TEST_OS_DEFAULT in bots/lib/constants.py)
183181
184182 TEST_JOBS How many tests to run in parallel. The default is 1.
185183
186- TEST_CDP_PORT Attach to an actually running browser that is compatible with
187- the Chrome Debug Protocol, on the given port. Don't use this
188- with parallel tests.
189-
190184 TEST_BROWSER What browser should be used for testing. Currently supported values:
191185 "chromium"
192186 "firefox"
You can’t perform that action at this time.
0 commit comments