# Filtering test based on category in Final Builder NUnit tool

**URL:** https://www.finalbuilder.com/forums/t/filtering-test-based-on-category-in-final-builder-nunit-tool/2360
**Category:** Discussion
**Created:** [March 23, 2015, 3:36am UTC](https://www.finalbuilder.com/forums/t/filtering-test-based-on-category-in-final-builder-nunit-tool/2360 "2015-03-23T03:36:22Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![anandharajramalingam](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@anandharajramalingam](https://www.finalbuilder.com/forums/u/anandharajramalingam)
#### Post date: [March 23, 2015, 3:36am UTC](https://www.finalbuilder.com/forums/t/filtering-test-based-on-category-in-final-builder-nunit-tool/2360/1 "2015-03-23T03:36:22Z")

</div>

I have developed unit testing for a MVC application and categorize the test cases using Category Attribute in NUnit based on module wise. I can run the test cases based on category wise in NUNIT GUI tool.

I have Automated the unit testing project in Final Builder6. For ensuring my site stability in daily schedule basis.

Requirement: I need to have run test cases in category wise by Final Builder NUnit tool.But i can&nbsp; run only&nbsp; as per whole testcase or single text fixture.

Refer the link: [http://help.finalbuilder.com/Index.htm?nunitaction.htm](http://help.finalbuilder.com/Index.htm?nunitaction.htm)

There&nbsp; is a option Fixture, in this i can run only as like whole namespace testcase and particuler fixture text cases. The fixture option screenshot include in attachment.  
  
.But I need to run&nbsp; test cases as per category wise&nbsp; and also exclude some category test in automation.

Is it possible in Final builder NUnit tool.? pasted example unit testing code in category wise . Here i have to to run "Account" Category via Final buider NUNit Tool``  
  
[TextFixture]  
public class Testcases  
{  
  
&nbsp;&nbsp; [Test]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Category('Account')]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void Login()  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Arrange  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Act  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Assert  
&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }  
&nbsp;[Test]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Category('Account')]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void Register()  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Arrange  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Act  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Assert  
&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }  
&nbsp;&nbsp;&nbsp;&nbsp; [Test]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Category('Sales')]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void Order()  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Arrange  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Act  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Assert  
&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }  
  
}

[\_\_34474\_\_0\_\_unit-capture.zip](https://www.finalbuilder.com/forums/uploads/default/original/2X/c/c24c3816e3e8c4ebc2d1bccf51593e13b209a78d.zip) (138.299 KB)

---

<div class="post-metadata">

### Author: ![anandharajramalingam](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@anandharajramalingam](https://www.finalbuilder.com/forums/u/anandharajramalingam)
#### Post date: [March 25, 2015, 6:02am UTC](https://www.finalbuilder.com/forums/t/filtering-test-based-on-category-in-final-builder-nunit-tool/2360/2 "2015-03-25T06:02:37Z")

</div>

Hi Team,  
  
Can you please provide solution ASAP.

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [March 25, 2015, 7:20am UTC](https://www.finalbuilder.com/forums/t/filtering-test-based-on-category-in-final-builder-nunit-tool/2360/3 "2015-03-25T07:20:46Z")

</div>

Thanks for bring to our attention we are missing the include and exclude parameter options for NUnit. I will look at adding these to FinalBuidler 7 in the next day. Just have to clear some other work before I can start.   
  
 In the mean time there is a work around in FinalBuilder 7 that you could use. In FinalBuilder 7 the NUnit action has a a property that allows the addition of the /include parameter. The property is named “Extra Params At End”. In this property you could write “/include:Account” to get the result you desire. I will let you know when the update to FinalBuilder 7 is available.   
  
 On another note, we won’t be able to back port this change to FinalBuilder 6 as FinalBuilder 7 has numerous updates which this change would rely upon. Also any release of FinalBuilder 6 would still require a valid license for the date it was released, so your best using FinalBuilder 7 and get all the other updates is provides.   
  
 Lastly updating to FinalBuilder 7 is very simple. All previous version projects opened in FinalBuilder 7 will automatically be converted and if saved will write to a new FinalBuilder 7 project file. The original will be left intact.

---

<div class="post-metadata">

### Author: ![anandharajramalingam](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@anandharajramalingam](https://www.finalbuilder.com/forums/u/anandharajramalingam)
#### Post date: [April 1, 2015, 2:12am UTC](https://www.finalbuilder.com/forums/t/filtering-test-based-on-category-in-final-builder-nunit-tool/2360/4 "2015-04-01T02:12:21Z")

</div>

Hi JSon,  
  
Thanks for your response.   
  
I have migrated final project into version 7 . but I could not able find the parmater name as “Extra Params At End” for include category way testing . Can you please give solution to how to add category section in&nbsp; Unit Testing tool&nbsp; and When will you provide updated feature[Category include and exclude option] in NUnit Final builder 7?

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [April 2, 2015, 1:12am UTC](https://www.finalbuilder.com/forums/t/filtering-test-based-on-category-in-final-builder-nunit-tool/2360/5 "2015-04-02T01:12:07Z")

</div>

Hi AnandharajRamalingam,   
  
 Great news the update to the NUnit action is located in the following build. Please let us know how this goes for you.   
  
 [http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700\_3284.exe](http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700_3284.exe)

---

<div class="post-metadata">

### Author: ![anandharajramalingam](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@anandharajramalingam](https://www.finalbuilder.com/forums/u/anandharajramalingam)
#### Post date: [April 2, 2015, 11:08am UTC](https://www.finalbuilder.com/forums/t/filtering-test-based-on-category-in-final-builder-nunit-tool/2360/6 "2015-04-02T11:08:38Z")

</div>

Hi Jason,   
  
 Great. It’s working what i am expected. Really fabulous support.   
  
 Regards,   
 Anandharaj .R
