Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Introducing BDDfy: the simplest BDD framework for .Net

, 23 Sep 2013 CPOL
This article is an introduction to installing and using bddify - a simple to use and extend BDD framework for .NET developers.
Bddify.Samples.Net4.zip
Bddify.Samples
Bddify.Samples.Atm
Bddify.Samples.suo
Bddify.Samples.TicTacToe
packages
Bddify.0.8
Bddify.0.8.nupkg
content
lib
NET35
Bddify.dll
NET40
Bddify.dll
SL4
Bddify.dll
Bddify.Samples.Atm.0.8
Bddify.Samples.Atm.0.8.nupkg
content
Bddify.Samples.Atm
Bddify.Samples.TicTacToe.0.8
Bddify.Samples.TicTacToe.0.8.nupkg
content
Bddify.Samples.TicTacToe
NUnit.2.5.10.11092
lib
nunit.framework.dll
nunit.mocks.dll
pnunit.framework.dll
Logo.ico
NUnit.2.5.10.11092.nupkg
tools
agent.conf
agent.log.conf
launcher.log.conf
lib
Failure.png
fit.dll
Ignored.png
Inconclusive.png
log4net.dll
nunit-console-runner.dll
nunit-gui-runner.dll
nunit.core.dll
nunit.core.interfaces.dll
nunit.fixtures.dll
nunit.uiexception.dll
nunit.uikit.dll
nunit.util.dll
Skipped.png
Success.png
nunit-agent-x86.exe
nunit-agent.exe
nunit-console-x86.exe
nunit-console.exe
nunit-x86.exe
nunit.exe
nunit.framework.dll
NUnitTests.nunit
pnunit-agent.exe
pnunit-launcher.exe
pnunit.framework.dll
pnunit.tests.dll
runFile.exe
test.conf
RazorEngine.2.1
lib
.NetFramework 4.0
RazorEngine.dll
System.Web.Razor.dll
RazorEngine.2.1.nupkg
Properties
Bddify.Samples.V0.9.zip
Bddify.Samples.suo
Bddify.0.9
Bddify.0.9.nupkg
content
lib
NET35
Bddify.dll
NET40
Bddify.dll
SL4
Bddify.dll
Bddify.Samples.Atm.0.9
Bddify.Samples.Atm.0.9.nupkg
content
Bddify.Samples.Atm
Bddify.Samples.TicTacToe.0.9
Bddify.Samples.TicTacToe.0.9.nupkg
content
Bddify.Samples.TicTacToe
nunit.framework.dll
nunit.mocks.dll
pnunit.framework.dll
Logo.ico
NUnit.2.5.10.11092.nupkg
agent.conf
agent.log.conf
launcher.log.conf
Failure.png
fit.dll
Ignored.png
Inconclusive.png
log4net.dll
nunit-console-runner.dll
nunit-gui-runner.dll
nunit.core.dll
nunit.core.interfaces.dll
nunit.fixtures.dll
nunit.uiexception.dll
nunit.uikit.dll
nunit.util.dll
Skipped.png
Success.png
nunit-agent-x86.exe
nunit-agent.exe
nunit-console-x86.exe
nunit-console.exe
nunit-x86.exe
nunit.exe
nunit.framework.dll
NUnitTests.nunit
pnunit-agent.exe
pnunit-launcher.exe
pnunit.framework.dll
pnunit.tests.dll
runFile.exe
test.conf
RazorEngine.dll
System.Web.Razor.dll
RazorEngine.2.1.nupkg
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<body>
		<h1>NUnit Acceptance Tests</h1>
		<p>
		Developers love self-referential programs! Hence, NUnit has always run all it's 
		own tests, even those that are not really unit tests.
		<p>Now, beginning with NUnit 2.4, NUnit has top-level tests using Ward Cunningham's 
			FIT framework. At this time, the tests are pretty rudimentary, but it's a start 
			and it's a framework for doing more.
			<h2>Running the Tests</h2>
		<p>Open a console or shell window and navigate to the NUnit bin directory, which 
			contains this file. To run the test under Microsoft .Net, enter the command
			<pre>    runFile NUnitFitTests.html TestResults.html .</pre>
			To run it under Mono, enter
			<pre>    mono runFile.exe NUnitFitTests.html TestResults.html .</pre>
			Note the space and dot at the end of each command. The results of your test 
			will be in TestResults.html in the same directory.
			<h2>Platform and CLR Version</h2>
			<table BORDER cellSpacing="0" cellPadding="5">
				<tr>
					<td colspan="2">NUnit.Fixtures.PlatformInfo</td>
				</tr>
			</table>
			<h2>Verify Unit Tests</h2>
		<p>
		Load and run the NUnit unit tests, verifying that the results are as expected. 
		When these tests are run on different platforms, different numbers of tests may 
		be skipped, so the values for Skipped and Run tests are informational only.
		<p>
		The number of tests in each assembly should be constant across all platforms - 
		any discrepancy usually means that one of the test source files was not 
		compiled on the platform. There should be no failures and no tests ignored.
		<p><b>Note:</b>
		At the moment, the nunit.extensions.tests assembly is failing because the 
		fixture doesn't initialize addins in the test domain.
		<p>
			<table BORDER cellSpacing="0" cellPadding="5">
				<tr>
					<td colspan="6">NUnit.Fixtures.AssemblyRunner</td>
				</tr>
				<tr>
					<td>Assembly</td>
					<td>Tests()</td>
					<td>Run()</td>
					<td>Skipped()</td>
					<td>Ignored()</td>
					<td>Failures()</td>
				</tr>
				<tr>
					<td>nunit.framework.tests.dll</td>
					<td>397</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td>nunit.core.tests.dll</td>
					<td>355</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td>nunit.util.tests.dll</td>
					<td>238</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td>nunit.mocks.tests.dll</td>
					<td>43</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td>nunit.extensions.tests.dll</td>
					<td>5</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td>nunit-console.tests.dll</td>
					<td>40</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td>nunit.uikit.tests.dll</td>
					<td>34</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td>nunit-gui.tests.dll</td>
					<td>15</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td>nunit.fixtures.tests.dll</td>
					<td>6</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td>0</td>
					<td>0</td>
				</tr>
			</table>
			<h2>Code Snippet Tests</h2>
		<p>
		These tests create a test assembly from a snippet of code and then load and run 
		the tests that it contains, verifying that the structure of the loaded tests is 
		as expected and that the number of tests run, skipped, ignored or failed is 
		correct.
		<p>
			<table BORDER cellSpacing="0" cellPadding="5">
				<tr>
					<td colspan="6">NUnit.Fixtures.SnippetRunner</td>
				</tr>
				<tr>
					<td>Code</td>
					<td>Tree()</td>
					<td>Run()</td>
					<td>Skipped()</td>
					<td>Ignored()</td>
					<td>Failures()</td>
				</tr>
				<tr>
					<td><pre>public class TestClass
{
}</pre>
					</td>
					<td>EMPTY</td>
					<td>0</td>
					<td>0</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td><pre>using NUnit.Framework;

[TestFixture]
public class TestClass
{
}</pre>
					</td>
					<td>TestClass</td>
					<td>0</td>
					<td>0</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td><pre>using NUnit.Framework;

[TestFixture]
public class TestClass
{
    [Test]
    public void T1() { }
    [Test]
    public void T2() { }
    [Test]
    public void T3() { }
}</pre>
					</td>
					<td><pre>TestClass
&gt;T1
&gt;T2
&gt;T3</pre>
					</td>
					<td>3</td>
					<td>0</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td><pre>using NUnit.Framework;

[TestFixture]
public class TestClass1
{
    [Test]
    public void T1() { }
}

[TestFixture]
public class TestClass2
{
    [Test]
    public void T2() { }
    [Test]
    public void T3() { }
}</pre>
					</td>
					<td><pre>TestClass1
&gt;T1
TestClass2
&gt;T2
&gt;T3</pre>
					</td>
					<td>3</td>
					<td>0</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<tr>
					<td><pre>using NUnit.Framework;

[TestFixture]
public class TestClass
{
    [Test]
    public void T1() { }
    [Test, Ignore]
    public void T2() { }
    [Test]
    public void T3() { }
}</pre>
					</td>
					<td><pre>TestClass
&gt;T1
&gt;T2
&gt;T3</pre>
					</td>
					<td>2</td>
					<td>0</td>
					<td>1</td>
					<td>0</td>
				</tr>
				<tr>
					<td><pre>using NUnit.Framework;

[TestFixture]
public class TestClass
{
    [Test]
    public void T1() { }
    [Test, Explicit]
    public void T2() { }
    [Test]
    public void T3() { }
}</pre>
					</td>
					<td><pre>TestClass
&gt;T1
&gt;T2
&gt;T3</pre>
					</td>
					<td>2</td>
					<td>1</td>
					<td>0</td>
					<td>0</td>
				</tr>
			</table>
			<h2>Summary Information</h2>
			<table BORDER cellSpacing="0" cellPadding="5">
				<tr>
					<td colspan="2">fit.Summary</td>
				</tr>
			</table>
	</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Mehdi Khalili
Software Developer (Senior) ThoughtWorks
United States United States
I work as a Senior Consultant for ThoughtWorks
Follow on   Twitter   Google+   LinkedIn

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141220.1 | Last Updated 23 Sep 2013
Article Copyright 2011 by Mehdi Khalili
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid