NUnit - Multiple properties of the same name? Linking to requirements

Posted by Ryan Ternier on Stack Overflow See other posts from Stack Overflow or by Ryan Ternier
Published on 2014-03-05T02:22:02Z Indexed on 2014/05/27 21:28 UTC
Read the original article Hit count: 170

I'm linking all our our System Tests to test cases and to our Requirements. Every requirement has an ID. Every Test Case / System Tests tests a variety of requirements. Every module of code links to multiple requirements.

I'm trying to find the best way to link every system test to its driving requirements.

I was hoping to do something like:

    [NUnit.Framework.Property("Release", "6.0.0")]
    [NUnit.Framework.Property("Requirement", "FR50082")]
    [NUnit.Framework.Property("Requirement", "FR50084")]
    [NUnit.Framework.Property("Requirement", "FR50085")]
    [TestCase(....)]
    public void TestSomething(string a, string b...)

However, that will break because Property is a Key-Value pair. The system will not allow me to have multiple Properties with the same key.

The reason I'm wanting this is to be able to test specific requirements in our system if a module changes that touches these requirements.

Rather than run over 1,000 system tests on every build, this would allow us to target what to test based on changes done to our code.

Some system tests run upwards of 5 minutes (Enterprise healthcare system), so "Just run all of them" isn't a viable solution. We do that, but only before promoting through our environments.

Thoughts?

© Stack Overflow or respective owner

Related posts about testing

Related posts about nunit