garris / garris/BackstopJS

Help! the compareFunction is not working?

Open
#1,594 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

请问backstopjs支持在backstop.json中调用自定义的对比方法么,我写了一个customCompare.js文件实现视觉对比时允许元素在任意方向下有指定像素的偏差,我把这个文件放到了backstop.json中的engineOptions下,如
"engineOptions": {
"compareFunction": "customCompare.js"
}
但是执行backstop测试后查看报告却没有生效,是什么原因呢?是哪里配置有问题么?
我查看了很多资料也没有找到解决方法,盼回复!

------------------------------------------------------------------------------------------------------------------------------------------------------------------
Does backstopjs support calling custom comparison methods in backstop.json? I wrote a customCompare.js file to allow for a specified pixel deviation in any direction during visual comparison. I placed this file under engineOptions in backstop.json, like this:
"engineOptions": {

"compareFunction": "customCompare.js"

}
However, after executing backstop, the report does not reflect the changes. What could be the reason? Is there a configuration issue somewhere? I've looked through a lot of resources but haven't found a solution. Looking forward to your reply!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.