nunit-console icon indicating copy to clipboard operation
nunit-console copied to clipboard

Use framework prefilter for massive perf improvement when running fraction of tests

Open jnm2 opened this issue 5 years ago • 2 comments

Following up from https://github.com/nunit/nunit/issues/2867: Skipping TestCaseSource invocation for tests outside the filter is not as intensely obvious for the console runner as it is for the VS adapter, since I tend to use the console for larger fractions of tests. However, there will still be noticeable time savings in our build scripts at work.

@CharliePoole has introduced discovery-time filtering in the framework and integrated with it in the NUnitLite runner. This pattern should be easy to follow in all the other runners: https://github.com/nunit/nunit/pull/2878

For @oznetmaster, this has resulted in roughly a 12x performance boost: https://github.com/nunit/nunit/pull/2878#issuecomment-404009088.

There's a possibility that this is also going to hold up the same enhancement in the adapter, which relies on the engine in this repo: https://github.com/nunit/nunit3-vs-adapter/issues/529. Is this something we'd be willing to ship in the next console release without waiting for the framework's next release?

jnm2 avatar Jul 11 '18 01:07 jnm2

See my comment on nunit/nunit3-vs-adapter#529

CharliePoole avatar Jul 11 '18 01:07 CharliePoole

Need to review this and decide whether to include in 4.0, postpone or close.

CharliePoole avatar Mar 09 '22 04:03 CharliePoole