TestCaseSource and TestFixtureSetUp

Bug #664018 reported by Rechenelf
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
NUnit Framework
Triaged
High
Unassigned

Bug Description

[Issue now tracked at https://github.com/nunit/nunit-framework/issues/7]

Obviously, the current implementation is the following:
- First, the Properties which are used for TestCaseSource are asked (static or not)
- Then the methods attributed with TestFixtureSetUp are called.
- Then test startup is done
and the test called.

It is possible to change the first two steps? The current behaviour is a problem for us. Because the property for the TestCaseSource should have some data from the database which the Connection is established in FixtureSetUp. The parameter vor the database, username, password and so on are set in the constructor of the class.

Now, I have hacked they in manually. This is not quite a nice way. ;-)

Tags: github
Rechenelf (matklaus)
description: updated
Revision history for this message
Charlie Poole (charlie.poole) wrote :

See also bug #538070 and the Parameterized Tests blueprint at
https://blueprints.launchpad.net/nunit-3.0/+spec/parameterized-tests.

Creation of static test cases is done at the time of loading the test,
so it's not merely a question of order - it's done only once per load
rather than once per test run.

Dynamic test cases will not exist until the test is run and we'll make
sure in the implementation that TestFixtureSetUp can influence the
creation of the tests.

Changed in nunit-3.0:
status: New → Triaged
importance: Undecided → High
tags: added: framework
tags: added: feature
tags: added: github
removed: feature framework
description: updated
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.