gdosreis / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

There should be a way to create dynamic combinatorial test cases. #521

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Today, it is possible to create a statically compiled combinatorial test,
letting MbUnit compute the derived test cases. However, it is impossible 
to create a combinatorial test dynamically (using static test factory, for
instance). One has to compute the relevant combinations manually and create
individual test case per each combination - major head ache.

I think there is no reason not to support dynamic combinatorial tests,
after all, you have all the computation logic already polished and
operational. 

Original issue reported on code.google.com by mark.kha...@gmail.com on 4 Sep 2009 at 6:18

GoogleCodeExporter commented 9 years ago
There is still a question of syntax...

And unfortunately the logic used to construct tests statically via attributes 
cannot
be used dynamically.

Yann, do you have any ideas how we could make combinatorial tests and other 
features
like decorated tests (ThreadedRepeat, Impersonate, etc.) usable and practical 
for
dynamic test cases?

Original comment by jeff.br...@gmail.com on 29 Sep 2009 at 1:39

GoogleCodeExporter commented 9 years ago
The major problem, I guess, is that there are many different sources of data 
which 
are hardly reusable in their current form (attribute) for dynamic test cases. 
Whatever the syntax chosen, we will need to propose a kind of API to expose the 
same 
features in another form.

Perhaps we could expose a fluent API that would allow to generate combinatorial 
data 
sets, which in turn, could be directly injected in the tests.

IEnumerable<object[]> MyFactory()
{
   return Combine
     .Column(true, false)
     .RandomNumber(1, 5, 10)
     .ThreadRepeat(3)
     .EnumData<MyEnum>();
}

What do you think?

Original comment by Yann.Tre...@gmail.com on 29 Sep 2009 at 5:33