TestCaseSource is evaluated for each Test Method using it separately

Bug #1083951 reported by Jiri Pik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Framework
New
Undecided
Unassigned

Bug Description

If a TestCaseSource is used by a number of TestMethods, the TestCaseSource is evaluated for each test method separately.

Though theoretically it could be useful in extreme cases, like timestamp of the test case source evaluation, in majority of cases, the TestCaseSource should be evaluated only once. It is necessary to evaluate the chances of the extreme cases as their code could break if this behavior is reversed.

Evaluating TestCaseSource only once would dramatically speed up running of slow TestCaseSources shared by number of TestMethods as they would be evaluated only once and each subsequent use of TestCaseSource would use only the previously calculated value.

Implementation is simple via a dictionary / cache / singleton.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.