Both Junit and TestNG provide mechanisms for iterating over a collection of input parameters and running your tests against them. In Junit this is supported via the Parameterized annotation, while TestNG uses @DataProvider.
How can you write data-driven tests using the test-is library? I tried using for list comprehension to iterate over an input parameter collection, but because deftest is a macro it's expecting is clauses.
From reading the article on parameterized tests in Junit it seems that once you get past the poiler plate the cool part of parameterization is that it lets you type this:
and easily define four tests.
in test-is the equivalent (no boiler-plate code required) macro is
are
If you want to give your inputs as a map then you could run something like:
though the
are
macro will produce more easily read output.