|
@@ -1,6 +1,8 @@
|
|
-# Three.js automatic regression testing with CI
|
|
|
|
|
|
+# Three.js end-to-end testing
|
|
|
|
|
|
-You probably shouldn't run this tests on PC because right now it's not optimized for local usage and you can get different results on different GPUs. Goal is to make quick automated testing inside CI and keep screenshot pack updated for it.
|
|
|
|
|
|
+You probably shouldn't run this tests on PC because it's not optimized for local usage and
|
|
|
|
+you can get different results on different GPUs. Goal is to make quick automated testing
|
|
|
|
+inside CI and keep screenshot pack updated for it.
|
|
|
|
|
|
### Local usage
|
|
### Local usage
|
|
```shell
|
|
```shell
|
|
@@ -8,13 +10,20 @@ You probably shouldn't run this tests on PC because right now it's not optimized
|
|
npm run make-screenshot <example1_name> ... <exampleN_name>
|
|
npm run make-screenshot <example1_name> ... <exampleN_name>
|
|
|
|
|
|
# check examples
|
|
# check examples
|
|
-npm run test-diff <example1_name> ... <exampleN_name>
|
|
|
|
|
|
+npm run test-e2e <example1_name> ... <exampleN_name>
|
|
|
|
|
|
# check all examples in browser
|
|
# check all examples in browser
|
|
-npx cross-env VISIBLE=ture npm run test-diff
|
|
|
|
|
|
+npx cross-env VISIBLE=ture npm run test-e2e
|
|
```
|
|
```
|
|
|
|
|
|
### How it works
|
|
### How it works
|
|
|
|
+- ci configs with parallelism
|
|
|
|
+- deterministic random/timer/rAF/video for screenshots
|
|
|
|
+- increased robustness with hided text, datgui, different flags and timeouts.
|
|
|
|
+- pipeline: turn off rAF -> 'networkidle0' -> networkTax -> turn on rAF -> render promise
|
|
|
|
+- added 3 progressive attempts for robustness
|
|
|
|
+
|
|
|
|
+### Development progress
|
|
|
|
|
|
| Travis | Attempts |
|
|
| Travis | Attempts |
|
|
|-----------------------------------------|--------------------------------------|
|
|
|-----------------------------------------|--------------------------------------|
|
|
@@ -24,17 +33,15 @@ npx cross-env VISIBLE=ture npm run test-diff
|
|
| 4=0+0+2+2 failed, time=5:13 | with network tax and other settings |
|
|
| 4=0+0+2+2 failed, time=5:13 | with network tax and other settings |
|
|
| 4=0+0+2+2 failed, time=3:26 | with progressive attempts |
|
|
| 4=0+0+2+2 failed, time=3:26 | with progressive attempts |
|
|
|
|
|
|
-- ci configs with parallelism
|
|
|
|
-- deterministic random/timer/rAF/video for screenshots
|
|
|
|
-- increased robustness with hided text, datgui, different flags and timeouts.
|
|
|
|
-- pipeline: turn off rAF -> 'networkidle0' -> networkTax -> turn on rAF -> render promise
|
|
|
|
-- added 3 progressive attempts for robustness
|
|
|
|
-
|
|
|
|
### Status
|
|
### Status
|
|
-97% examples are covered with tests. Random robusness in CI >93%. Robustness on different machines ~97%. For example in Windows webgl_effects_ascii example always fails or on integrated GPU you will have additional artifacts: webgl_materials_texture_anisotropy, webgl_postprocessing_procedural, webgl_shaders_tonemapping.
|
|
|
|
|
|
+97% examples are covered with tests. Random robusness in CI >93%. Robustness on different machines ~97%.
|
|
|
|
+For example on integrated GPU you can have additional artifacts: webgl_materials_texture_anisotropy,
|
|
|
|
+webgl_postprocessing_procedural, webgl_shaders_tonemapping.
|
|
|
|
|
|
-### Probably wrong screenshots
|
|
|
|
-webgl2_multisampled_renderbuffers, webgl_simple_gi, webgl_postprocessing_dof2, webgl_loader_texture_pvrtc
|
|
|
|
|
|
+### Wrong screenshots but ok for CI
|
|
|
|
+webgl_loader_bvh, webgl_simple_gi, webgl_postprocessing_dof2, webgl_loader_texture_pvrtc, webgl_physics_volume
|
|
|
|
|
|
### Contribution
|
|
### Contribution
|
|
-You can help to simplify puppeteer script by suggesting example with [HeadlessExperimental.beginFrame](https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental) CDP API.
|
|
|
|
|
|
+Proper determinism for video/audio is welcome. You can cover more examples: `dof2` can be rendered with 2 rAF,
|
|
|
|
+`offsceencanvas`/`webgl_test_memory2` with additional puppeteer flags, `webgl_simple_gi` with
|
|
|
|
+[beginFrame](https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental) CDP API.
|