This is very similar to this other PR where I add CLI options to the "update-screenshots" command: #4542
This implements this idea #4536, but for the "test" command:
Options:
--version Show version number [boolean]
-c, --config Path to configuration json [string] [required]
-s, --scenario Limit to specific scenarios [array]
-p, --port Port for web server [number] [default: 9030]
-d, --dry-run Checks that all comparison images exist
[boolean] [default: false]
-q, --quiet Hide the puppeteer controlled browser
[boolean] [default: false]
-h, --help Show help [boolean]
To run the new test ci command, use this command line:
% npm run test -- --scenario=texture --quiet
Explanation of the new features:
--scenario, this now also allows you to specify multiple scenarios in the whitelist, rather than only one. It now also selects scenarios based on being a subset of the config.json scenario name, thus you can run all tests that contain say "transform" or "clearcoat".
--missing-only is very useful when I add new tests and I don't want to render all other tests just to get goldens for the new ones.
--dry-run, when I want to figure out which goldens are missing.
--quiet, I can run the test in the background. Also gives about a 10% speed boost on my machine.
--port, allows me to run two of these at the same time, useful when I want to run two different renderers at the same time, or work on two separate branches simultaneously.
This is very similar to this other PR where I add CLI options to the "update-screenshots" command: #4542
This implements this idea #4536, but for the "test" command:
To run the new test ci command, use this command line:
Explanation of the new features: --scenario, this now also allows you to specify multiple scenarios in the whitelist, rather than only one. It now also selects scenarios based on being a subset of the config.json scenario name, thus you can run all tests that contain say "transform" or "clearcoat". --missing-only is very useful when I add new tests and I don't want to render all other tests just to get goldens for the new ones. --dry-run, when I want to figure out which goldens are missing. --quiet, I can run the test in the background. Also gives about a 10% speed boost on my machine. --port, allows me to run two of these at the same time, useful when I want to run two different renderers at the same time, or work on two separate branches simultaneously.