Skip to content

Combine nunit3 drivers and switch to new interface #1596

@CharliePoole

Description

@CharliePoole

The NUnit3FrameworkDriver is still using the original framework API we created for NUnit3. Back in 2018, @rprouse created an improved API for use with the .NET Core targets but we have continued to use the older API for .NET Framework targets.

Until recently, we were supporting three different NUnit3 drivers. The removal of the .NET Standard driver, which has not been used for a while, brought us to two.

In this issue, I'm proposing to combine those two, NUnit3FrameworkDriver and NUnitNetCore31Driver into a single driver combining the code for both .NET Framework and .NET Core and allowing the driver to decide which API to use depending on the target runtime and NUnit framework version in use. This can give a number of benefits.

  1. A cleaner API for NUnit 4 and newer builds of NUnit 3.
  2. Simpler code in the driver factory
  3. Fewer tests to maintain
  4. In my opinion, code that makes it easier to understand the differences between the two APIs and how we use them.

Tasks

  • Refactor the two drivers so they "line up" cleanly for comparison.
  • Create an initial build of the new driver, using conditional code, which is functionally equivalent to what we have now, and switch over to using it for all targets.
  • Switch dynamically to use the new API for NUnit versions that support it.
  • Remove the two old drivers.

Metadata

Metadata

Assignees

Labels

EnhancementV4All issues related to V4 or later - use -label:V4 to get V3 issues

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions