-
Notifications
You must be signed in to change notification settings - Fork 198
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
There's no way to configure test hierarchy at runtime #33
Comments
I will take a look at this.. at the moment the fixtures are all generated internally at runtime, I'll see if we can add some sort of api to allow you to generate them. |
Actually, I can take on this task. |
I've made a start already, should have it working in the next day or so. |
@vincentparrett thank you! |
this is where I'm heading IFixtureProviderContext = interface IFixtureProvider = interface IPluginLoadContext = interface IPlugin = interface So you would need to create a class that implements IPlugin, and another that implements IFixtureProvider, which you register when your plugin class's GetPluginFeatures method is called. The IFixtureProviderContext interface has methods for createing a ITestFixture, which has methods for adding child fixtures and tests. I'm going to refactor the internals of DUnitX to use this architecture as well, should clean up the fixture class a lot (I'm not all that happy with it, does too much in the constructor). |
I have implemented the needed functionality in DUnitX and submitted a pull request for DelphiSpec. It's not perfect, DUnitX expects the test methods to be on the same class as a fixture, so I had to create a fixture per scenario. If you can see a better way to do it, I'm open to suggestions. |
TDUnitXTestRunner uses unit names to create test hierarchy and there's no way to change this behavior (please correct me if I'm wrong). Do you plan to add more flexibility to this class?
For instance, DUnit provides TTestSuite class for creating test hierarchy. I don't propose adding some sort of TTestSuite to DUnitX, but I believe DUnitX misses this feature.
The text was updated successfully, but these errors were encountered: