-
Notifications
You must be signed in to change notification settings - Fork 88
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
What to expect for the future of the FixtureFactory? #115
Comments
Hello Flavio. At 2015~ the fixture-factory was the best tool to make fixture. But I think with java9+ and lombok, we can use constructor with all arguments or set* methods with chain pattern. I understand fixture-factory has more features, but I do not like the Rule class, I think it expensive and does take new java improviments. Perhaps new fixture-factory should use a new sintax using the new java9+ o kotlin syntax. |
Hello @flaviolsousa ,I am using fixture factory to setup test data for API testing. How can I add dynamic data to a template? For instance, the response of a request should be fed into the template dynamically so that this template can be used to pass as a request to the following endpoint. |
@flaviolsousa Im back to Java into a new project that I am working in and I saw the problem with Fixture Factory not working with Java11+. I found the solution updating ASM dependency version used by paranamer: paul-hammant/paranamer#34 I will try to get back to Fixture Factory and see if we could update the project to support the later java versions |
The fixture-factory is deprecated?
I really like the tool... but it is not having upgrades.
In fact, I noticed that there has been no commit for 14 months.
Should I continue using it in my projects?
Below is a list of improvements that I propose and could help to develop.
Update the source code to Java11
mvn test
its only working on Java8 and it is broke on Java11Support to
local variable type inference
(var) on from/gimmeWe inform the class on
from
method ofFixtureFacture
, so I imagine something like this:Output:
The
Processors
are useful and already working on all situations. But, to simplify, if a class that implementsTemplateLoader
also implements theProcessor
interface, theexecute
method could be executed when generating the instances.Or the Rule class can have a method postConstruct that I can override (I think I prefer this option)
Or another way would be to create a postConstruct annotation like Spring does (This I don't know how to do 😅)
The
"prefix-${name}"
feature is greatting. But it is not possible to do this with instances of other types (non String)that returns the instance of an object in another property.
It would be very useful to have a way to use the
regex
orrandom
function directly from the test (outside the template) ... for primitive types there is no example of how to do it.I needed this to generate queryParameters and custom headers. But I didn't find any example using
FixtureFacture
.Phenomenal the
instant("18 years ago")
feature. But don't works withLocalDate
andLocalDateTime
.Ok ... it's easy to solve like with
LocalDate.now().minusYears(30)
. But it is strange to break the executionWhen I do something wrong 😇, the exception thrown does not inform the attribute name, it only tells the reason.
The items are in the order I remembered ...
Congratulations for tool ... I'm putting it on all my projects (at CVC Corp), I don't see anything like what you created anywhere.
Tell me what you think about the list items. If you liked the suggestions, and will continue to support the tool, I can try to help.
The text was updated successfully, but these errors were encountered: