Click here to Skip to main content
Click here to Skip to main content

Running NUnit GUI tests using FinalBuilder

, 25 Aug 2005
Rate this:
Please Sign up or sign in to vote.
A self created final builder tutorial

How to run Nunit tests using FinalBuilder

 

Initial requirements:

·        Reader is familiar with the usage Nunit and knows how to create Nunit tests or projects.

·        Reader is familiar with the menus and links provided on the FinalBuilder tool.

·        Reader is familiar with coding and creating projects and DLLs using C#.

 

 

Steps.

Create a Nunit project

1.            First create a project using Nunit that would contain the DLLs to be tested. Alternatively you could point to an existing C# project.

2.            To do this you may run the Nunit-Gui.exe which in turn opens Nunit-Gui application.

3.            In this example you may open the DLL mock-assembly.dll that is automatically installed at the time of installing Nunit. Normally this is stored in the path “C:\Program Files\NUnit 2.2\bin”

4.            Save the file as a Nunit test project (*.nunit) file type. Name it “mock-assembly.nunit” (“.nunit” is the file extension).

 

Running the test from FinalBuilder

1.            Create a new FinalBuilder project and name it as “FinalBuilderLesson.fbz3”.

2.            In the top of the FinalBuilder editor right click next to right of the action list “OnFailure” to open the pop up menu.

3.            In the pop up menu select “Add Action List”. Give the name of the action list as “Nunit Test”.

4.            From the left menu  click on “Windows OS” to view the action items available in it (if not already visible).

5.            Double click on the “Execute Program” icon. This opens up the “Execute Program” action item properties box.

6.            Select the page “Program”.

7.            In the program file input box browse to the path where you saved the “mock-assembly.nunit” file.

8.            In the Options – Parameters input box type in “mock-assembly.nunit /run”

9.            In the Options – Start in input box type in “<the directory where the file is stored>”

10.        Uncheck the Options - Hide Window check box.

11.        Save the project.

12.        Now select the Execute Program action type and click Alt + F9

 

End notes

To make this application is little bit robust I added the try, catch, finally and end action tags from the flow control in the left menu. To move the “Execute Program” action list inside the catch block use the menu items in the “Actions” top menu. In the try block I have put a “Windows Does Exist” action item. This item is the “Windows Exist” menu item in the “Windows OS” of the left menu list.

Some of the images for this project can be viewed by clicking the links below,

http://FB_NUnit/FinalBuilder_Execute_Program_Nunit.JPG

http://www.codeproject.com/useritems/FB_NUnit/FinalBuilder_NUnitSettings.JPG

http://www.codeproject.com/useritems/FB_NUnit/Mock-assembly.JPG

http://www.codeproject.com/useritems/FB_NUnit/FinalBuilder_Windows_Exists.JPG

 

mail to : diontrish@sify.com

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

RedSunBeer
Web Developer
India India
achievements: underpaid-underrated-confused
status: Comfortably_Numb

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 25 Aug 2005
Article Copyright 2005 by RedSunBeer
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid