Kumar
Kumar

Reputation: 141

Select and run individual test cases from CCNet

I am about to configure our C#.NET source code to have automated building mechanism using CCNET. Im wondering whether I can configure CCNet such a way that I can select individual test or subset of test from an assembly and run them. If it is possible to do so, could you please guide me in configuring the same.

Please let me know if further information is needed and thank you in advance.

Regards, Kumar

Upvotes: 0

Views: 121

Answers (1)

StefanoGermani
StefanoGermani

Reputation: 741

You need to specify the CategoryAttribute in your tests and then specify it in the command that run the tests.

namespace NUnit.Tests
{
  using System;
  using NUnit.Framework;

  [TestFixture]
  public class SuccessTests
  {
    [Test]
    [Category("Long")]
    public void VeryLongTest()
    { /* ... */ }
}

and then:

nunit-console myassembly.dll /include:Long

Upvotes: 2

Related Questions