I have read the documentation about EUnit, but still I have no idea what is the purpose of test generators.
I have also read a nice tutorial here, but still no luck (a little too advanced).
I somewhat understand that a test generator function returns a set of tests which are then executed by EUnit. (is that right?)
Unfortunately, the only thing that I am confident about now is that I can write a test like this:
myfun_test() ->
assertEqual(myresult,mymod:myfun()).
The question is: What are the test generators in EUnit needed for and what is their relation with a Simple Test Object?
P.S. I know there is a wonderful world (example) of unit tests which are made with the help of various automation tools and concepts, but I do not know how to enter it.
I think if you have tried to write some many unit tests for your project, you will find the value of test generator in the practice.
If use test generator, you don't need to spend time just for creation of many and many different test function names, and codes for creation of test generator is shorter than standard function.
For example, the following codes is from
gprocopen source project for test generator, and it uses test generator for your reference and the file can be found ingithub.