We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to write my first tests with this tool (seems really neat), but I'm running into some issues recreating the example projects I've seen (mainly this one: https://github.com/zinserjan/webdriverio-example/blob/master/test/diff-test.js).
relevant package.json items:
"wdio-visual-regression-service": "^0.9.0", "webdriverio": "^5.11.6"
Posting the configuration below, let me know if anything else helps.
var path = require('path'); var VisualRegressionCompare = require('wdio-visual-regression-service/compare'); function getScreenshotName(basePath) { return function(context) { var testName = context.test.title; var resolution = context.meta.width || context.meta.orientation || 'unknown'; var browserVersion = parseInt(/\d+/.exec(context.browser.version)[0]); var browserName = context.browser.name; return path.join(basePath, `${testName}_${resolution}_${browserName}_v${browserVersion}.png`); }; } exports.config = { runner: 'local', path: '/', specs: [ // 'test/specs/basic.js', 'test/specs/visualRegression.js' ], exclude: [ ], // maxInstances: 10, // capabilities: [{ maxInstances: 5, browserName: 'chrome', }], logLevel: 'info', bail: 0, screenshotPath: './errorShots/', baseUrl: 'http://locally.hostedurl.com', waitforTimeout: 10000, connectionRetryTimeout: 90000, connectionRetryCount: 3, services: ['chromedriver', 'visual-regression'], visualRegression: { compare: new VisualRegressionCompare.LocalCompare({ referenceName: getScreenshotName(path.join(process.cwd(), 'screenshots/reference')), screenshotName: getScreenshotName(path.join(process.cwd(), 'screenshots/screen')), diffName: getScreenshotName(path.join(process.cwd(), 'screenshots/diff')), misMatchTolerance: 0.11 }), viewportChangePause: 1000, viewports: [{ width: 320, height: 480 }, { width: 480, height: 320 }, { width: 1024, height: 768 }], orientations: ['landscape', 'portrait'], }, plugins: { 'wdio-screenshot': {}, }, framework: 'mocha', reporters: ['spec'], mochaOpts: { ui: 'bdd', timeout: 60000 } }
The text was updated successfully, but these errors were encountered:
Same issue
Sorry, something went wrong.
No branches or pull requests
Trying to write my first tests with this tool (seems really neat), but I'm running into some issues recreating the example projects I've seen (mainly this one: https://github.com/zinserjan/webdriverio-example/blob/master/test/diff-test.js).
relevant package.json items:
Posting the configuration below, let me know if anything else helps.
The text was updated successfully, but these errors were encountered: