Creating my testdata for blackbox unittesting my Microflow is cumbersome, errorprone an large. Is there a better way?

1
For blackbox unittesting my Microflow I want a list of objects with values. That list will be my testdata-set. The only way I know how to create such a list is to 1) create a list, 2) Create an object with the values I need and 3) add that object to list of objects and repeat steps 2 and 3 for every testcase I need. See my microflow https://modelshare.mendix.com/models/2242ec85-a990-45df-a8fe-a5fd12fd1409/test-input-parsing-and-validation This is quite cumbersome and for every testobject I have to make sure the caption it the same as the values. Is there a better way?
asked
2 answers
0

Hi Tim,

I believe there is a random data generator in the appstore, however this is still for Mx 5.

A alternative for your microflow is something like this:

https://modelshare.mendix.com/models/97c9b303-981e-4349-9d27-97ee410d2e9d/ac-t-create-data

You create a 'manual' loop and within the loop change the data with some logic.

Hope this helps!

answered
0

Hi Tim,

IOP your unit test has too much logic in it. I would separate it in 4 tests, each of them covering exactly one case. That way you can get rid of the list& the loop.

-Andrej

answered