Git Product home page Git Product logo

Comments (3)

wswebcreation avatar wswebcreation commented on June 9, 2024

Hi @opensourcesensor

I'm not familiar with GitLab, but what happens, based on your config is the following:

when WDIO is started it will

  • save images in a separate folder by using this savePerInstance: true
  • auto save a baseline image if no image is found by using this autoSaveBaseline: true

When you don't provide a baseline, or the module can't find the baseline, it will automatically create that baseline by simply copying the actual screenshot to the baseline folder. It will then use that baseline to compare against the actual image which will result in something like expect(true).toEqual(true) making your tests succeed.

You might need to check where the folders are created on GitLab to see what is really happening. You could enable the debug: true, in the config of the image-compare module to get extra logs printed with hopefully some paths

from visual-testing.

fabianschmider123 avatar fabianschmider123 commented on June 9, 2024

Hi @wswebcreation ,
thank you.
Yes, that information is known for me, with the automatically creation of the path.
--> I start the tests with debug:true, and returnAllCompareData:true - the paths I use local are correct and the same paths are used on gitlab.
I think I found the reason:
I changed the baseline image with the same name, another image content.
Local: 79% difference -> it created the diff image and the actual image
Gitlab: 79% difference -> it does not create a diff image or actual image

Means the comparison is working, but I think they generate the data on the docker image - means the generated images(diff and actual) came not back to gitlab.

So as the functionality is given, the comparison works, I will upload all baseline images to gitlab, then this issue is solved.
--> I can see the diff images in the console, so I can generate them local or have a look at the website, if there are differences.
Means this issue is solved!

Just another short question regarding this, maybe you know the answer:
For testing. I added the lines for fix the paths:
baselineFolder: join(process.cwd(), '.test/sauceLabsBaseline/'),
screenshotPath: join(process.cwd(), '.tmp/'),

--> Then the error occurs
Failed loading configuration file: C:\Webdriver\wdio.chrome.js: join is not defined
ReferenceError: join is not defined
I did not find anything about this join is missing in the wdio/image comparison issue documentation.
I have installed the wdio-image-service on another PC, same error.

Do you have this issue once/know how to solve?

Many thanks,
BR
Fabian Schmider

from visual-testing.

wswebcreation avatar wswebcreation commented on June 9, 2024

Sorry for missing this

Failed loading configuration file: C:\Webdriver\wdio.chrome.js: join is not defined
ReferenceError: join is not defined

This means that you didn't include join from the NodeJS module path, see also this code https://github.com/wswebcreation/wdio-image-comparison-service/blob/main/tests/configs/wdio.saucelabs.conf.js#L1

Going to close this issue now because it's solved, it's still open for questions

from visual-testing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.