-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
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
Ability to store approval files under different folder #2
Comments
My more modern approval java port at (https://github.com/nikolavp/approval) can archieve this with something I call PathMappers. Actually this is the main usecase for them, you can find more information in the docs |
Was this PR ever made? Or included in this non-fork? |
I believe @LarsEckart's PR #100 for further options is a step in this direction. The to-do list now also contains "Options for file path": Ideally, this can be configured globally viaa properties file or something similar. Otherwise, one would have to set this for each |
Triggered by another PR, we updated documentation as this feature is already available: https://github.com/approvals/ApprovalTests.Java/blob/master/approvaltests/docs/Configuration.md#package-level-settings Does this help? |
Thanks for the hint @LarsEckart, works for me! Side note: Since For a future release, instead of: public class PackageSettings {
public static String ApprovalBaseDirectory = "../resources/";
} Maybe you want to consider something like: class ApprovalTestsConfiguration {
static final String APPROVAL_BASE_DIRECTORY = "../resources/";
} ✌️ |
Could we take this one step further with
which gets stored in |
We didn't know about package level annotations, it looks interesting! |
@LarsEckart did |
@talios sorry, we didn't get to it and then it disappeared from my radar. lately we were spending time on our pipelines but I hope to soon tackle our open issues here again more actively. |
@LarsEckart All good - I'd totally forgotten about it til I ran into some code locally references this ticket ;) |
I wonder if anything further for |
I'd like the ability to store generated approval files under different folder and not strictly in the folder where my test source code is located.
For example, when using maven-type projects, my source files are located under PROJECT/src/test/java/some/package and I'd like approval files to be generated under PROJECT/src/test/resources/some/package. This helps keeping the test source folder clean and free of lots of approval files, especially when there are lots of test classes with lots of tests using Approvals.
I will submit a pull request with my proposed solution to this issue.
The text was updated successfully, but these errors were encountered: