Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Currently, the TestRunners class provides a mechanism for creating a TestRunner that takes in a Variable Registry. The concept of providing variables to the Test Runner is very valuable. However, the notion of the VariableRegistry is an internal implementation detail that is getting exposed, creating a leaky abstraction.
We should remove the override of the createTestRunner() method that takes the Variable Registry and instead expose a set of methods of TestRunner:
void setVariable(String name, String value)
String getVariable(String name)
void setVariables(Map<String, String> variables)
Map<String, String> getVariables()
Additionally, as-is, if no VariableRegistry is provided, the default is to use a Variable Registry that provides System and Environment variables. This should be avoided, as it encourages unit tests to depend on environment-specific settings.
Attachments
Issue Links
- links to