This project is read-only.

Run a test suite with NUnit GUI

Once you've created an Xml test suite, you'll probably want to execute it. The easiest way to do this is by the means of NUnit GUI.

For this tutorial, we presuppose that you've downloaded the binaries of NBi (and NUnit) and copied them in a unique directory. In this directory you'll need following dlls:
  • NUnit.Framework.dll (needed by NBi to delegate the execution of tests after transformation)
  • NBi.Xml.dll (needed to interpret correctly the Xml (nbits) file and transform it into an effective test suite)
  • NBi.NUnit.dll (Implementation of the assertions specific to NUnit)
  • NBi.Core.dll (Needed to execute the queries, transform tests results, ...)
  • NBi.Framework.dll (Implements some helper functions, will be developped in the future).
  • NBi.NUnit.Runtime.dll (The point of connection between NBi and NUnit)

Some other dlls are also used by NBi (external dependencies)
  • Antlr4.StringTemplate.dll
  • MarkdownLog.dll
  • Microsoft.SqlServer.DTSRuntimeWrap.dll
  • NCalc.dll

Installation Folder.png

Before starting the NUnit GUI, you need to reference your test suite (Nbits file) to NBi. For this, you've several options. You can simply put a file with the extension ".nbits" in the same directory than dll NBi.NUnit.Runtime.dll. This file will be interpreted by the framework as the definition of the test-suite you want to run. If more than one ".nbits" file is available in this directory, NBi will choose one of them (the first file found in alphabetic order).

An alternative is to create a file named NBi.NUnit.Runtime.dll.config (with "dll"!). In this file, just add the standard configuration of an NBi test-suite including the path to your test suite. In the sample bellow, the test suite is defined in the sub-directory named "SubDirectory" in file "myTestSuite.nbits".
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<configSections>
		<section name="nbi" type="NBi.NUnit.Runtime.NBiSection, NBi.NUnit.Runtime"/>
	</configSections>
	<nbi testSuite="SubDirectory\myTestSuite.nbits"/>
</configuration>

There is a third option specific to NUnit. If you create a NUnit project file, you're able to specify the config file to use. This will allow you to put several config file in the directory where the dll are dropped. Each config files redirecting to different test-suites. To know more about this method check the article Share binaries between test-suites.

Then, start the NUnit GUI and choose the menu option "file > open project". Select the dll named NBi.NUnit.Runtime.dll (available in your installation folder).

Select NBi.NUnit.Runtime.png

This dll will read your test suite, previously created. Then NUnit/NBi will parse and interpret it. The list of tests is populated and displayed in your UI (It can take a few seconds). Now, you just need to select your tests and execute them with NUnit UI.

Run Test Suite.png

Last edited Nov 23, 2014 at 5:38 PM by Seddryck, version 8

Comments

No comments yet.