NUnit and similar unit testing software

conversebazaarΛογισμικό & κατασκευή λογ/κού

2 Νοε 2013 (πριν από 3 χρόνια και 9 μήνες)

91 εμφανίσεις

NUnit and similar unit testing
software

By
-

Ankush Tiwari

What is NUnit?


NUnit is a unit
-
testing framework for all
.NET
languages.


Initially
ported from Junit


It
is written entirely in C# and has been
completely redesigned to take advantage of
many .NET language features, for example
custom attributes and other reflection related
capabilities
.

Features of NUnit

1.
Assertions


Assertions
are central to unit testing in any of the xUnit
frameworks, and NUnit is no exception.


NUnit
provides a rich set of assertions as static methods
of the Assert class.


If an assertion fails, the method call does not return and
an error is reported.

a.
Equality
Asserts

b.
Identity
Asserts

c.
Comparison
Asserts

d.
Type
Asserts

e.
Condition
tests

f.
Utility
methods


Features of NUnit

2.
Attribues


In order to test an application under NUnit, you
write test code that is specially annotated using
custom
attributes


3.
Configuration

Files


If your application stores settings in
configuration files
, NUnit provides you with the
ability to have settings for your test, which are
different from those used in production.


Features of NUnit

4.
Multiple

Assemblies


In addition to running tests in a single assembly,
NUnit provides support for tests organized as
multiple assemblies
and for creating and
running tests as NUnit Test Projects.


5.
Visual

Studio

Support


For those using NUnit on a Windows system
with Visual Studio installed, Visual Studio
support
is available.

NUnit GUI

TestDriven.NET



TestDriven.NET
is a zero friction unit testing
add
-
in for Microsoft Visual
Studio.



TestDriven.NET
allows a developer to run
or
debug
their tests from within Visual Studio with
a single
-
click.

ReSharper



ReSharper
is a renowned productivity tool that
makes Microsoft Visual Studio a much better
IDE
.



Developed by JetBrains

Books Related to NUnit


Test Driven Development in Microsoft .NET

by
James W. Newkirk and Alexei
A.Vorontsov

.



Pragmatic
Unit Testing in C#

by Andy Hunt and
Dave Thomas



Extreme
Programming Adventures in C#

by Ron
Jeffries

References


http
://www.nunit.org


http://
www.testdriven.net


http://www.jetbrains.com/


http
://www.softpedia.com
/


YouTube: Introduction to NUnit, Kellerman
Software Channel

http://
www.youtube.com/watch?v=1TPZetHaZ
-
A


Thank you!

Questions?