TestCentric / testcentric-engine

Test engine that loads and runs tests for TestCentric
MIT License
0 stars 3 forks source link

Design and add support for NUnit engine extensions #199

Open CharliePoole opened 1 month ago

CharliePoole commented 1 month ago

Although we recognize NUnit extension attributes and will try to load them if they are present, loading of existing extensions does not succeed in most cases. The reasons for this vary from one extension to another, so each extension needs to be addressed separately. In general, the problem is that the existing extensions implement NUnit interfaces whereas TestCentric is expecting a TC interface of the same name. In addition, some extension methods return objects defined within NUnit, which we do not support.

We could solve these problems easily by importing and directly using the NUnit types but this would only be useful for extension points for which we do not expect to have TC-specific extensions. If we intend to have both NUnit and TC extensions for a given extension point, then some way for the two to co-exist must be developed.

Some extensions may be developed by third-parties, including NUnit users. Since we will usually be unaware of such extensions, they are not included in the scope of this issue, with the exception of ITestEventListener. We know that has been implemented by many users and will need to be completely supported for that reason

The scope of this issue includes the following ExtensionPoints, which exist in NUnit and are duplicated in TestCentric:

CharliePoole commented 1 month ago

As a first step towards design, we should consider whether we wish to support each of the listed NUnit extensions in TestCentric. The following is a first cut, which may be updated as we proceed.

IDriverFactory

The existing V2 Driver must be supported. Support for other extensions, if they exist, is not necessary.

IProjectLoader

The existing NUnit project loader must be supported. The Visual Studio project loader is extremely limited and we could replace it with a TestCentric version. Optionally, both could be internalized.

IResultWriter [DONE]

The existing V2 Result Writer should be supported, since so many third-party apps still require the V2 format.

IService [NOT NEEDED]

Since there are no existing NUnit extensions and (to my knowledge) none under development, this does not need to be supported. The TC extension point will be retained for future development

ITestEventListener [DONE]

This needs strong support because of it's extensive use by users. In addition, we should support the existing Team City event listener.

CharliePoole commented 1 month ago

Implementation Notes