F!! Add auto approve reporter based on system properties
Description
The new reporter will automatically approve the changeset (copy received to approved) when a specified System property is set (to true or it is simply present).
The goal is to allow to update easily all relevant files from the tests that are run, without requiring code changes but in a controlled manner (only when the user explicitly sets the property).
The new auto approver would be very useful for projects using maven, gradle, etc, where system properties can be passed along when running a test. For instance:
mvn test -Dtest=TestMySuperExampleUsingApproval -Dorg.approvaltests.reporters.autoapprove (triggers the auto approver and creates/updates the .aproved files)
mvn test -Dtest=TestMySuperExampleUsingApproval (doesn't trigger the auto approver and if files do not match it simply fails)
hey, we're back doing weekly sessions to work on ApprovalTests. Would you like to join on a Monday evening (18-20 o'clock), walk us through this PR and get this merged?
Monday 22/1 at 19:00 GMT +1 is fine with me. Feel free to send me an invite at [email protected]
@zabetak FYI this is now possible using environment variable - https://github.com/approvals/ApprovalTests.Java/blob/master/approvaltests/docs/how_to/ConfigureReporters.md#method-4-environment-variables