You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/05/08 14:50:42 UTC
[GitHub] [echarts] pissang opened a new pull request #14894: test(visual): reduce false positive test result in visual regression test.
pissang opened a new pull request #14894:
URL: https://github.com/apache/echarts/pull/14894
<!-- Please fill in the following information to help us review your PR more efficiently. -->
## Brief Information
This pull request is in the type of:
- [ ] bug fixing
- [ ] new feature
- [x] others
### What does this PR do?
Our visual regression testing tool may have about 50 cases that having false-positive results each run. These cases should pass but the result shows they are different. Most of the reason is that we can't sync the time between server and client. So when we call a screenshot command on the server, which is asynchronous. We can't ensure the time between two runs is totally the same when screenshots happen. It will lead to different results if there are loop animations on the page.
So in this PR, we do some changes to make sure we can fully control the time when doing screenshots:
1. Replace loader `esl` to a simpler loader `simpleRequire.js`. In the `simpleRequire.js` all callbacks will be batched and invoked in one frame.
2. Mock requestAnimationFrame. Start counting frames before invoking the callbacks in the `simpleRequire.js`.
3. Mock Date and each frame has a fixed time(this may cause an infinite loop if the code use delta time to determine if break the loop).
4. Mock setTimeout, setInterval. Make sure callbacks are executed in a guaranteed frame.
5. Load SVG, JSON, text resources in `simpleRequire.js`. Make sure frames started at the same time that executing the main code.
After these changes. `false-positive` results have been reduced to none.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang merged pull request #14894: test(visual): reduce false positive test result in visual regression test.
Posted by GitBox <gi...@apache.org>.
pissang merged pull request #14894:
URL: https://github.com/apache/echarts/pull/14894
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] echarts-bot[bot] commented on pull request #14894: test(visual): reduce false positive test result in visual regression test.
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #14894:
URL: https://github.com/apache/echarts/pull/14894#issuecomment-835568843
Congratulations! Your PR has been merged. Thanks for your contribution! 👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] echarts-bot[bot] commented on pull request #14894: test(visual): reduce false positive test result in visual regression test.
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #14894:
URL: https://github.com/apache/echarts/pull/14894#issuecomment-835391188
Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).
The pull request is marked to be `PR: author is committer` because you are a committer of this project.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org