I'm using rider and running integration tests across multiple projects which all run in parallel.
Prior to running my tests, I need to clear down all data in my database. The reason I'm not adding a [TearDown] per test, is because some fixtures work with the same concepts (and would interfere with one another). Also, with so many test classes it seems a lot faster to have just one [TearDown] at the beginning or end of all tests.
[SetUpFixture] of course covers only a namespace, so it will not help this scenario where I need to cover multiple test projects.
Does anyone have any solutions or suggestions to this problem? I could write a command line script of course, but then I'd lose the benefits of Rider's test runner.
I'm using rider and running integration tests across multiple projects which all run in parallel.
Prior to running my tests, I need to clear down all data in my database. The reason I'm not adding a [TearDown] per test, is because some fixtures work with the same concepts (and would interfere with one another). Also, with so many test classes it seems a lot faster to have just one [TearDown] at the beginning or end of all tests.
[SetUpFixture] of course covers only a namespace, so it will not help this scenario where I need to cover multiple test projects.
Does anyone have any solutions or suggestions to this problem? I could write a command line script of course, but then I'd lose the benefits of Rider's test runner.
Share Improve this question asked Mar 6 at 11:02 FBryant87FBryant87 4,6187 gold badges51 silver badges90 bronze badges 3- stackoverflow/a/3188421/43846 – stuartd Commented Mar 6 at 15:09
- [SetUpFixture] runs once per project I believe – FBryant87 Commented Mar 6 at 15:28
- Ah, yes of course it does, sorry. You could perhaps ‘add file as link’ a setup in all the test projects, though I think you might need a way to make sure it only actually runs once – stuartd Commented Mar 6 at 16:48
1 Answer
Reset to default 1The thing is that the most coarse-grained level of NUnit is an assembly, i.e. it is written with the idea in mind that resources are to be shared within an assembly, but not across several assemblies.
Now it depends on how much you want to work against the framework
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744981064a4604444.html
评论列表(0条)