SlideShare a Scribd company logo
NUnit – A Unit Test Framework for .Net
Topics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
NUnit framework ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What NUnit Framework is not: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Features
Download & Installation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Simple concepts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Input & Output of nUnit NUnit Dll, exe file  XML file (Optional) Processing details on the GUI or Command prompt
Writing Unit Test Code ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Select the Solution explorer mode
Right click references and select Add reference
Select Browse
Goto the nunitin directory, choose nunit.framework.dll and press open.
Now press ok in the Add reference page
The dll has been added to your reference list.
In your code, add using nunit.framework.
Add testfixture to your program
TestFixture Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How to write your test code ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Calculator Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Calculator Example cont… ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Build the Project ,[object Object]
LOCATION of dll ,[object Object],[object Object]
Location of exe files
Starting the GUI from console ,[object Object],[object Object],[object Object],[object Object],[object Object]
Starting the GUI from console ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
GUI MODE ,[object Object],[object Object],[object Object],[object Object],[object Object]
Select open in the NUNIT GUI
Select the dll which you want to test(In this case, we have moved the dll to the nunitin folder)
Runs Perfectly
Tests Fail
To save the output in an XML file
Writing in the output file ,[object Object],[object Object]
Console mode ,[object Object],[object Object],[object Object],[object Object]
The different options are ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Runs Perfectly
Test Fails
Output file ,[object Object],[object Object]
Now lets Examine the Output file (test passed)
Test Failed
Failure message(1 message)
Test Failure(2 tests)
Proposed Architecture ,[object Object],[object Object],[object Object]
NUNIT ,[object Object]

More Related Content

What's hot

Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesDerek Smith
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration TestingDavid Berliner
 
Test automation
Test automationTest automation
Test automationXavier Yin
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit TestingJoe Tremblay
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And MockingJoe Wilson
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework DesignsSauce Labs
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven TestingMaveryx
 
Unit testing best practices
Unit testing best practicesUnit testing best practices
Unit testing best practicesnickokiss
 
JUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkJUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkOnkar Deshpande
 
Introduction to Unified Functional Testing 12 (UFT)
Introduction to Unified Functional Testing 12 (UFT)Introduction to Unified Functional Testing 12 (UFT)
Introduction to Unified Functional Testing 12 (UFT)Archana Krushnan
 

What's hot (20)

Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best Practices
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration Testing
 
Test automation
Test automationTest automation
Test automation
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework Designs
 
Unit Testing in Java
Unit Testing in JavaUnit Testing in Java
Unit Testing in Java
 
Junit
JunitJunit
Junit
 
Unit Test
Unit TestUnit Test
Unit Test
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven Testing
 
Junit 4.0
Junit 4.0Junit 4.0
Junit 4.0
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Unit testing best practices
Unit testing best practicesUnit testing best practices
Unit testing best practices
 
JUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkJUnit- A Unit Testing Framework
JUnit- A Unit Testing Framework
 
Unit testing with JUnit
Unit testing with JUnitUnit testing with JUnit
Unit testing with JUnit
 
Unit testing
Unit testing Unit testing
Unit testing
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
Introduction to Unified Functional Testing 12 (UFT)
Introduction to Unified Functional Testing 12 (UFT)Introduction to Unified Functional Testing 12 (UFT)
Introduction to Unified Functional Testing 12 (UFT)
 

Viewers also liked

NUnit Features Presentation
NUnit Features PresentationNUnit Features Presentation
NUnit Features PresentationShir Brass
 
How and what to unit test
How and what to unit testHow and what to unit test
How and what to unit testEugenio Lentini
 
Design and Implementation of Speech Based Scientific Calculator
Design and Implementation of Speech Based Scientific CalculatorDesign and Implementation of Speech Based Scientific Calculator
Design and Implementation of Speech Based Scientific CalculatorShantha Suresh M
 
Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...Justin James
 
Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014Maarten Balliauw
 
Using nu get the way you should svcc
Using nu get the way you should   svccUsing nu get the way you should   svcc
Using nu get the way you should svccMaarten Balliauw
 
Basic calculator tutorial
Basic calculator tutorialBasic calculator tutorial
Basic calculator tutorialGilkye
 
Vhdl code and project report of arithmetic and logic unit
Vhdl code and project report of arithmetic and logic unitVhdl code and project report of arithmetic and logic unit
Vhdl code and project report of arithmetic and logic unitNikhil Sahu
 
Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web APIBrad Genereaux
 
Easymock Tutorial
Easymock TutorialEasymock Tutorial
Easymock TutorialSbin m
 
Task 1 preperation
Task 1 preperationTask 1 preperation
Task 1 preperationpablomonk
 
Scientific calculator project in c language
Scientific calculator project in c languageScientific calculator project in c language
Scientific calculator project in c languageAMIT KUMAR
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCSteven Smith
 

Viewers also liked (20)

NUnit Features Presentation
NUnit Features PresentationNUnit Features Presentation
NUnit Features Presentation
 
Nunit
NunitNunit
Nunit
 
How and what to unit test
How and what to unit testHow and what to unit test
How and what to unit test
 
Day 1 writing
Day 1   writingDay 1   writing
Day 1 writing
 
Design and Implementation of Speech Based Scientific Calculator
Design and Implementation of Speech Based Scientific CalculatorDesign and Implementation of Speech Based Scientific Calculator
Design and Implementation of Speech Based Scientific Calculator
 
Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...
 
Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014
 
Using nu get the way you should svcc
Using nu get the way you should   svccUsing nu get the way you should   svcc
Using nu get the way you should svcc
 
Basic calculator tutorial
Basic calculator tutorialBasic calculator tutorial
Basic calculator tutorial
 
Developing NuGet
Developing NuGetDeveloping NuGet
Developing NuGet
 
Vhdl code and project report of arithmetic and logic unit
Vhdl code and project report of arithmetic and logic unitVhdl code and project report of arithmetic and logic unit
Vhdl code and project report of arithmetic and logic unit
 
Unit Testing (C#)
Unit Testing (C#)Unit Testing (C#)
Unit Testing (C#)
 
Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web API
 
Easymock Tutorial
Easymock TutorialEasymock Tutorial
Easymock Tutorial
 
Task 1 preperation
Task 1 preperationTask 1 preperation
Task 1 preperation
 
Types of pattern
Types of patternTypes of pattern
Types of pattern
 
Scientific calculator project in c language
Scientific calculator project in c languageScientific calculator project in c language
Scientific calculator project in c language
 
Excellent rest using asp.net web api
Excellent rest using asp.net web apiExcellent rest using asp.net web api
Excellent rest using asp.net web api
 
ASP.NET WEB API
ASP.NET WEB APIASP.NET WEB API
ASP.NET WEB API
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVC
 

Similar to N Unit Presentation

Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated TestingNick Pruehs
 
Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologieselliando dias
 
J unit presentation
J unit presentationJ unit presentation
J unit presentationPriya Sharma
 
Unit testing framework
Unit testing frameworkUnit testing framework
Unit testing frameworkIgor Vavrish
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosFlutter Agency
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7Hoamuoigio Hoa
 
Coded ui - lesson 4 - coded ui test
Coded ui - lesson 4 - coded ui testCoded ui - lesson 4 - coded ui test
Coded ui - lesson 4 - coded ui testOmer Karpas
 
Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in JavaMichael Fons
 
Apache Ant
Apache AntApache Ant
Apache AntAli Bahu
 
Apache Ant
Apache AntApache Ant
Apache AntAli Bahu
 
Stopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestStopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestSeb Rose
 
Project3build.xml Builds, tests, and runs the project .docx
Project3build.xml      Builds, tests, and runs the project .docxProject3build.xml      Builds, tests, and runs the project .docx
Project3build.xml Builds, tests, and runs the project .docxwoodruffeloisa
 
Junit4&testng presentation
Junit4&testng presentationJunit4&testng presentation
Junit4&testng presentationSanjib Dhar
 
FlexUnit 4 for contributors
FlexUnit 4 for contributorsFlexUnit 4 for contributors
FlexUnit 4 for contributorsmichael.labriola
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2Tricode (part of Dept)
 

Similar to N Unit Presentation (20)

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated Testing
 
8-testing.pptx
8-testing.pptx8-testing.pptx
8-testing.pptx
 
Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologies
 
J unit presentation
J unit presentationJ unit presentation
J unit presentation
 
Unit testing framework
Unit testing frameworkUnit testing framework
Unit testing framework
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
 
Modern Python Testing
Modern Python TestingModern Python Testing
Modern Python Testing
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7
 
Coded ui - lesson 4 - coded ui test
Coded ui - lesson 4 - coded ui testCoded ui - lesson 4 - coded ui test
Coded ui - lesson 4 - coded ui test
 
J Unit
J UnitJ Unit
J Unit
 
Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in Java
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Stopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestStopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under Test
 
Project3build.xml Builds, tests, and runs the project .docx
Project3build.xml      Builds, tests, and runs the project .docxProject3build.xml      Builds, tests, and runs the project .docx
Project3build.xml Builds, tests, and runs the project .docx
 
Junit4&testng presentation
Junit4&testng presentationJunit4&testng presentation
Junit4&testng presentation
 
FlexUnit 4 for contributors
FlexUnit 4 for contributorsFlexUnit 4 for contributors
FlexUnit 4 for contributors
 
Zend Framework 2 - PHPUnit
Zend Framework 2 - PHPUnitZend Framework 2 - PHPUnit
Zend Framework 2 - PHPUnit
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2
 

More from priya_trivedi

More from priya_trivedi (7)

Success By Shiv Khera Samir Shah
Success By Shiv Khera   Samir ShahSuccess By Shiv Khera   Samir Shah
Success By Shiv Khera Samir Shah
 
Swot Analysis
Swot AnalysisSwot Analysis
Swot Analysis
 
Power Of Positive Attitude
Power Of Positive AttitudePower Of Positive Attitude
Power Of Positive Attitude
 
Qtp
QtpQtp
Qtp
 
Final Automation Testing
Final Automation TestingFinal Automation Testing
Final Automation Testing
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 

N Unit Presentation