Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterized test cases #34

Open
jdduncan opened this issue Jun 13, 2016 · 1 comment
Open

Parameterized test cases #34

jdduncan opened this issue Jun 13, 2016 · 1 comment

Comments

@jdduncan
Copy link
Contributor

This is a generalized version of the work to allow running the test suite with multiple adapters. It relates to removing all use of globals in test cases, by providing a dictionary of test parameters.

A test driver can set parameters with jones_test.driver.setParameter(); an individual test case, instantiated from e.g. new SmokeTest(), could retrieve them via test.getParameter().

In a single test run, it should be possible to run a test suite multiple times with different sets of parameters.

@jdduncan
Copy link
Contributor Author

A test that requires a parameter (e.g. a test that must have an adapter set) could declare this by calling a method like "usesParameter" or "withParameter":

var t1 = new jones_test.ConcurrentTest("SimpleInsert");
t1.usesParameter("adapter");

Or, fluently:
t1 = new jones_test.ConcurrentTest("SimpleInsert").withParameter("adapter");

The test driver should run non-parameterized tests once.
For parameterized tests, the driver should run them once per supplied parameter value.

A SmokeTest could register a parameter for every test in its suite:

t1 = new SmokeTest();
t1.suite.usesParameter("adapter");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant