Skip to content

Using Verify as a standalone tool from the command line #716

Description

@flcdrg

Is the feature request related to a problem

Sometimes I'm working on a system (eg a CI/CD pipeline) where a file is generated and I would love to be able to use something like Verify to compare the file against an expected output.

Describe the solution

Providing a command line tool that embeds the Verify functionality, such that you can run it something like:

verify.cli path/to/fileToTest.json

The tool would return a non-zero exit code if the comparison failed, so it could be used to signal failure in a script or automated pipeline.

Describe alternatives considered

  • I could create a whole .NET test project just to load the file, but that seems like overkill.
  • I can do a simple file compare in a scripting language, but then I don't get the same kind of useful context if the files are slightly different.

Additional context

I've been working on a proof of concept over at https://github.com/flcdrg/Verify/tree/cli. If you're receptive to the idea then happy to turn that into a PR once it's ready for public consumption.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions