Open skrilagg opened 2 years ago
Hi Michel,
yes, we introduce the annotation @SampleRootPath
in 2.0.0. The annotation can be used on the test class or on the SamplerFixture
. It can be used to define a base path of a central test repository.
We have had an intermediate version where the complete path of a sample file was composed of three parts, like this:
[root path][package or folder][file name]
Each part has a default value and can be configured manually. The default is generated using the package of the test class and the name of the test method, exactly as it was done in 1.1.0. I think this might be what you are looking for:
[manually configured root path][default: generated folder using the package of the test class][manually defined file name]
I wasn't happy with this, because the API got a little hard to understand, and I wasn't sure if this really would be used. So I decided to refactor this to a version with only two parts:
[root path][path to file]
Maybe we should consider to switch back to the three-part version. You can find an example for that here:
This is part of the branch
https://github.com/ppi-ag/deep-sampler/tree/feature_configurable_json_path_3_parts
Maybe we can find a design that offers both, a simple configuration and an "advanced" configuration. What do you think?
BTW: Since you are already coding in DeepSampler, you are welcome to fork the repo and create pull requests, if you like.
Hi Jan,
I will give it a shot once I got the project working. Gradle KTS seems a little tricky when using Eclipse, but I'll sort that out.
Yes, that might be easier if you have the chance to use Idea. Even with the community edition gradle works out of the box.
Hi all,
I am using version 1.1.0 and therefore had to add some functionality, that in parts is already added for version 2.x.
Part of this is the ability to configure a base repository for stored files, which I just noticed you already implemented for the next version. Another addition I added is the ability to configure if the name of the testMethod should be used in the generated json file name.
Let me explain, why I added this:
For convenience I added another configuration value to the Annotation UseSamplerFixture, which is then used inside the JUnitPluginUtils. Let me show you with the following:
Let me hear your thoughts on this.
Cheers, Michel