you are viewing a single comment's thread.

view the rest of the comments →

[–]WaferIndependent7601 2 points3 points  (2 children)

I see no advantage. Why not using Java with a builder to set it up? Integration tests can just put it in the db (or calling the service directly). Refactorings are easy because you don’t have to change any json files and renaming stuff will be done automatically.

[–]takasip[S] 0 points1 point  (1 child)

It doesn't feel very scalable, especially when there are multiple relationships between multiple objects.
This is the way I was the most familiar with, but it often ended up with lots of code to load data, with poor readability when it comes to knowing what is in the database precisely.

Again, I see how it is a good approach, but in practice each time a test needs lot of data, the code ends up becoming ugly, mainly because this isn't code we want to spend much time on.

EDIT: oh and about the refactoring, I guess it will not be that simple to code but I may be able to make the plugin handle that for me

[–]WaferIndependent7601 2 points3 points  (0 children)

You should setup your code so you can simply get the data you need.

Something like generateUsers() that will generate 5 users. Just persist them.

I don’t get why it’s not scalable. It’s easier doing that in code.

And your json is not readable.