Coder Social home page Coder Social logo

Comments (2)

JoseAlcerreca avatar JoseAlcerreca commented on June 9, 2024 1

It might be a bit confusing, but the flag roborazzi.test.verify=true enables you to call captureRoboImage() and generate an error if the images differ. This allows you to achieve the same behavior as ./gradlew verifyRoborazziDebug simply by running the ./gradlew testDebugUnitTest task. It's not meant for filtering.

Yes, this is what I meant. I see that as the alternative to the solution proposed in this issue: instead of filtering, just run one task. However, I'd like to keep them separate.

I think the above solution should meet your requirements, but there might be a better way to approach this.

I'll look into this, thanks!

from nowinandroid.

takahirom avatar takahirom commented on June 9, 2024

Thank you for reaching out and considering this issue.

If you want to ignore screenshot tests during local test runs, you can use the following configuration:

// Use -PincludeScreenshot to include screenshot tests
it.useJUnit {
    if (!project.hasProperty("includeScreenshot")) {
        excludeCategories("com.google.samples.apps.nowinandroid.testing.category.ScreenshotTests")
    }
}

By excluding the -PincludeScreenshot property, the screenshot tests will be ignored as needed. We have a similar setting in DroidKaigi app.

Roborazzi doesn't support this filtering in the library due to simplicity, using JUnit's built-in features. More information can be found at Roborazzi issue #36.
It might be a bit confusing, but the flag roborazzi.test.verify=true enables you to call captureRoboImage() and generate an error if the images differ. This allows you to achieve the same behavior as ./gradlew verifyRoborazziDebug simply by running the ./gradlew testDebugUnitTest task. It's not meant for filtering.

I think the above solution should meet your requirements, but there might be a better way to approach this.

from nowinandroid.

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.