I am writing an NUnit test that I want run only in the Release configuration. Is there an elegant way of doing this with a test case attribute? Right now, I am surrounding
You could use the [Category] attribute. If you mark release only tests with [Category("Release")] then exclude that category in your normal test run and include it in you release run.
So now your test becomes
[Test]
[Category("Release")]
public void MyReleaseOnlyTest()
{
// stuff
}