Reputation: 156
I have very simple question but can't find in Google any information about it.
I use NUnit3 and NunitAdapter to run my tests through Visual Studio or dotnet test on build agents. I need to add attributes [assembly: Parallelizable()]
and [assembly: LevelOfParallelism()]
.
But netCore project haven't assemblyInfo.cs and I don't know where to add this attributes. Where it should be placed?
P.S: I had never worked with netCore before, we migrated to it few days ago.
Upvotes: 3
Views: 3789
Reputation: 5379
As explained into NUnit documentation you can specify Parallelizable Attribute at test level
For example
[TestFixture]
[Parallelizable(ParallelScope.All)]
Or alternatively, you can add a file and call it AssemblyInfo.cs
Upvotes: 3
Reputation: 119156
You can place that attribute in any file you like, it doesn't have to be AssemblyInfo.cs
. Having said that, I like to keep these things separate or they become easy to miss so I would advise you keep them in a distinct file, and probably call it AssemblyInfo.cs
.
Upvotes: 5