SlideShare a Scribd company logo
1 of 28
Unit Testing using NunitIntroduction to Art of Testing Presenter: GauravArora Email: admin@hyderabadtechies.info Note: This presentation is presented with courtesy of HyderabadTechies.info
Topics What is unit testing? Step-by-step Overview What is Nunit? Hands-on using Nunit
What is unit testing? Unit Testing is a way/method by which individual units of source code/application are tested to determine if they are fit for use. In other words, we can say method by which individual test one thing at a time [i.e. units] without touching external sources [DB, external files, libraries etc.]
Who is responsible for testing? Primarily job for Unit Testing is completely for Developers. But, when we talk about Quality or testing then it would be a different answer. ,[object Object]
Everyone who is a team member
Even it’s the responsibility of customer,[object Object]
Helpful in Documentation of requirements,[object Object],[object Object]
What is Nunit? Nunit is unit-testing framework and supports all .Net languages. It has been written entirely in C# [csharp]. Refer - http://www.nunit.org/
Start with Nunit Before start, we need nUnit framework: Download from : http://www.nunit.org/index.php?p=download http://sourceforge.net/projects/nunit/ [after download, install per your choice, not going in details of this chapter here…] For more info : http://www.nunit.org/
Pictorial Flow of Nunit nUnit Dll, exe file  XML file (Optional) Processing details on the GUI or Command prompt Image : showing [Input & Output]
Nunit : two operational flavors Nunit is having two operational modes: ,[object Object],Graphical user interface, nothing to type just click button and check the results. ,[object Object],Console mode, runs from command prompt, you need to write commands and check the results.
Nunit : Hands-on Before this make sure, nunit framework has been downloaded has properly installed at your system. ,[object Object]
Add references to your project
Write Test methods
Run your tests either with GUI or CUI mode,[object Object]
Nunit : Hands-on… BMI Test ,[object Object]
Select a Class Library project [why choose class library, we are creating a separate project for our tests]
Add reference of nunit.framework.dll in your project
Include ‘NUnit.Framework’ namespace in your project,[object Object]
Hands-on: BMI Test-Structure Using TestFixture Attribute Test Class Setup attribute TearDown attribute Test attribute
Hands-on : Points of interest In previous slide we notified : ,[object Object]
Method names are long, defining scenarios
Attribute TestFixture tells the fixture of test class
Method with Setup attribute calls at very first and TearDown calls after every TestMethod, no matters if there will be an exception,[object Object]
Lets take a look on Code!
Nunit : CUI Console mode is one of the modes available of Nunit, lets discuss how to run from command [console window]: The command to execute the exe in console mode is  	nunit-console.exe [filename] [option]
Nunit : CUI - Output
Nunit : CUI - Options *Options /Fixture=STR                    Fixture to test /config=STR                      project configuration to load /XML=STR                         Name of XML output file /transform=STR                name of transform file /xmlConsoledisplay XML to the console /output=STR                     File to receive test output (short :/out=STR)  /err=STR                           File to receive test error output /labels                              Label each test in stdout /include = STR                  list of categories to include /exclude = STR                 list of categories to exclude /noshadow                        disable shadow option /thread                             runs thread on a separate thread /wait                                 waitfor input before closing console window    /nologoDo not display the logo /help                                Display help (short format: /?)

More Related Content

What's hot

Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)Leonard Fingerman
 
Katalon studio vs selenium comparision
Katalon studio vs selenium comparisionKatalon studio vs selenium comparision
Katalon studio vs selenium comparisionPrabhusundar6
 
Role Of Qa And Testing In Agile 1225221397167302 8
Role Of Qa And Testing In Agile 1225221397167302 8Role Of Qa And Testing In Agile 1225221397167302 8
Role Of Qa And Testing In Agile 1225221397167302 8a34sharm
 
Test automation framework
Test automation frameworkTest automation framework
Test automation frameworkQACampus
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using SeleniumNaresh Chintalcheru
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation TestingArchana Krushnan
 
Unit Tests And Automated Testing
Unit Tests And Automated TestingUnit Tests And Automated Testing
Unit Tests And Automated TestingLee Englestone
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework IntroductionPekka Klärck
 
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
Software Testing Life Cycle (STLC) | Software Testing Tutorial | EdurekaSoftware Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
Software Testing Life Cycle (STLC) | Software Testing Tutorial | EdurekaEdureka!
 
Automation testing introduction for FujiNet
Automation testing introduction for FujiNetAutomation testing introduction for FujiNet
Automation testing introduction for FujiNetHai Tran Son
 
TestNG Session presented in PB
TestNG Session presented in PBTestNG Session presented in PB
TestNG Session presented in PBAbhishek Yadav
 
How to apply AI to Testing
How to apply AI to TestingHow to apply AI to Testing
How to apply AI to TestingSAP SE
 
Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comIdexcel Technologies
 
Automated Testing with Agile
Automated Testing with AgileAutomated Testing with Agile
Automated Testing with AgileKen McCorkell
 
Developing a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian BayerDeveloping a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian BayerQA or the Highway
 
Web automation using selenium.ppt
Web automation using selenium.pptWeb automation using selenium.ppt
Web automation using selenium.pptAna Sarbescu
 

What's hot (20)

Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)
 
Katalon studio vs selenium comparision
Katalon studio vs selenium comparisionKatalon studio vs selenium comparision
Katalon studio vs selenium comparision
 
Role Of Qa And Testing In Agile 1225221397167302 8
Role Of Qa And Testing In Agile 1225221397167302 8Role Of Qa And Testing In Agile 1225221397167302 8
Role Of Qa And Testing In Agile 1225221397167302 8
 
Test automation framework
Test automation frameworkTest automation framework
Test automation framework
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
Katalon Studio Presentation.pptx
Katalon Studio Presentation.pptxKatalon Studio Presentation.pptx
Katalon Studio Presentation.pptx
 
TestNG Framework
TestNG Framework TestNG Framework
TestNG Framework
 
Unit Tests And Automated Testing
Unit Tests And Automated TestingUnit Tests And Automated Testing
Unit Tests And Automated Testing
 
Test automation process
Test automation processTest automation process
Test automation process
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
 
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
Software Testing Life Cycle (STLC) | Software Testing Tutorial | EdurekaSoftware Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
 
Automation testing introduction for FujiNet
Automation testing introduction for FujiNetAutomation testing introduction for FujiNet
Automation testing introduction for FujiNet
 
TestNG Session presented in PB
TestNG Session presented in PBTestNG Session presented in PB
TestNG Session presented in PB
 
How to apply AI to Testing
How to apply AI to TestingHow to apply AI to Testing
How to apply AI to Testing
 
Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.com
 
Automated Testing with Agile
Automated Testing with AgileAutomated Testing with Agile
Automated Testing with Agile
 
Developing a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian BayerDeveloping a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian Bayer
 
Web automation using selenium.ppt
Web automation using selenium.pptWeb automation using selenium.ppt
Web automation using selenium.ppt
 

Viewers also liked

Huu Le - Tma Open Source For Project Tools
Huu Le - Tma Open Source For Project ToolsHuu Le - Tma Open Source For Project Tools
Huu Le - Tma Open Source For Project ToolsMario B.
 
He thong cong cu kiem thu tu dong va dam bao chat luong phan mem
He thong cong cu kiem thu tu dong va dam bao chat luong phan memHe thong cong cu kiem thu tu dong va dam bao chat luong phan mem
He thong cong cu kiem thu tu dong va dam bao chat luong phan memViet Hung Vu
 
Bai tap testing junit…..
Bai tap testing junit…..Bai tap testing junit…..
Bai tap testing junit…..Mua Xuong
 
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...Thomas Weller
 
Android Nâng cao-Bài 8-JSON & XML Parsing
Android Nâng cao-Bài 8-JSON & XML ParsingAndroid Nâng cao-Bài 8-JSON & XML Parsing
Android Nâng cao-Bài 8-JSON & XML ParsingPhuoc Nguyen
 
Kiểm thử bảo mật web
Kiểm thử bảo mật webKiểm thử bảo mật web
Kiểm thử bảo mật webMinh Tri Nguyen
 
NUnit Features Presentation
NUnit Features PresentationNUnit Features Presentation
NUnit Features PresentationShir Brass
 
[Seminar] Hướng dẫn viết test case
[Seminar] Hướng dẫn viết test case[Seminar] Hướng dẫn viết test case
[Seminar] Hướng dẫn viết test caseLe Vu Trung Thanh
 
Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development Phuoc Nguyen
 
Android Nâng cao-Bài 6-Multi theme-adb tool-jUnit
Android Nâng cao-Bài 6-Multi theme-adb tool-jUnitAndroid Nâng cao-Bài 6-Multi theme-adb tool-jUnit
Android Nâng cao-Bài 6-Multi theme-adb tool-jUnitPhuoc Nguyen
 
Slide đồ án kiểm thử PM
Slide đồ án kiểm thử PMSlide đồ án kiểm thử PM
Slide đồ án kiểm thử PMNguyễn Anh
 
Giáo trình Tester Full
Giáo trình Tester FullGiáo trình Tester Full
Giáo trình Tester FullThanh Sơn
 
Đồ án kiểm thử phần mềm
Đồ án kiểm thử phần mềmĐồ án kiểm thử phần mềm
Đồ án kiểm thử phần mềmNguyễn Anh
 
Nunit framework for .NET application
Nunit framework for .NET applicationNunit framework for .NET application
Nunit framework for .NET applicationMinh Tri Lam
 
Bao cao tttn an ninh web
Bao cao tttn   an ninh webBao cao tttn   an ninh web
Bao cao tttn an ninh webNhóc Mèo
 

Viewers also liked (17)

Huu Le - Tma Open Source For Project Tools
Huu Le - Tma Open Source For Project ToolsHuu Le - Tma Open Source For Project Tools
Huu Le - Tma Open Source For Project Tools
 
Adp junit
Adp junitAdp junit
Adp junit
 
He thong cong cu kiem thu tu dong va dam bao chat luong phan mem
He thong cong cu kiem thu tu dong va dam bao chat luong phan memHe thong cong cu kiem thu tu dong va dam bao chat luong phan mem
He thong cong cu kiem thu tu dong va dam bao chat luong phan mem
 
Bai tap testing junit…..
Bai tap testing junit…..Bai tap testing junit…..
Bai tap testing junit…..
 
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
 
Android Nâng cao-Bài 8-JSON & XML Parsing
Android Nâng cao-Bài 8-JSON & XML ParsingAndroid Nâng cao-Bài 8-JSON & XML Parsing
Android Nâng cao-Bài 8-JSON & XML Parsing
 
Kiểm thử bảo mật web
Kiểm thử bảo mật webKiểm thử bảo mật web
Kiểm thử bảo mật web
 
NUnit Features Presentation
NUnit Features PresentationNUnit Features Presentation
NUnit Features Presentation
 
[Seminar] Hướng dẫn viết test case
[Seminar] Hướng dẫn viết test case[Seminar] Hướng dẫn viết test case
[Seminar] Hướng dẫn viết test case
 
Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development
 
Android Nâng cao-Bài 6-Multi theme-adb tool-jUnit
Android Nâng cao-Bài 6-Multi theme-adb tool-jUnitAndroid Nâng cao-Bài 6-Multi theme-adb tool-jUnit
Android Nâng cao-Bài 6-Multi theme-adb tool-jUnit
 
Slide đồ án kiểm thử PM
Slide đồ án kiểm thử PMSlide đồ án kiểm thử PM
Slide đồ án kiểm thử PM
 
Giáo trình Tester Full
Giáo trình Tester FullGiáo trình Tester Full
Giáo trình Tester Full
 
Đồ án kiểm thử phần mềm
Đồ án kiểm thử phần mềmĐồ án kiểm thử phần mềm
Đồ án kiểm thử phần mềm
 
NUnit vs MSTest
NUnit vs MSTestNUnit vs MSTest
NUnit vs MSTest
 
Nunit framework for .NET application
Nunit framework for .NET applicationNunit framework for .NET application
Nunit framework for .NET application
 
Bao cao tttn an ninh web
Bao cao tttn   an ninh webBao cao tttn   an ninh web
Bao cao tttn an ninh web
 

Similar to Unit Testing Using N Unit

Coded ui - lesson 1 - overview
Coded ui - lesson 1 - overviewCoded ui - lesson 1 - overview
Coded ui - lesson 1 - overviewOmer Karpas
 
Beginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NETBeginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NETBaskar K
 
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
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated TestingNick Pruehs
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7Hoamuoigio Hoa
 
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...Comunidade NetPonto
 
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYury M
 
Introduction To UnitTesting & JUnit
Introduction To UnitTesting & JUnitIntroduction To UnitTesting & JUnit
Introduction To UnitTesting & JUnitMindfire Solutions
 
Industrialization of Android Development (Concept)
Industrialization of Android Development (Concept)Industrialization of Android Development (Concept)
Industrialization of Android Development (Concept)Mohamed TAIEB
 
Csharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul YaoCsharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul YaoMamgmo Magnda
 
Alexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extraAlexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extrarit2010
 
Unit Tests? It is Very Simple and Easy!
Unit Tests? It is Very Simple and Easy!Unit Tests? It is Very Simple and Easy!
Unit Tests? It is Very Simple and Easy!Return on Intelligence
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Mikkel Flindt Heisterberg
 
Writing Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkWriting Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkPeter Kofler
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingAnna Russo
 
Inventory your network and clients with PowerShell
Inventory your network and clients with PowerShellInventory your network and clients with PowerShell
Inventory your network and clients with PowerShellConcentrated Technology
 
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...Anna Russo
 

Similar to Unit Testing Using N Unit (20)

SE2011_10.ppt
SE2011_10.pptSE2011_10.ppt
SE2011_10.ppt
 
Coded ui - lesson 1 - overview
Coded ui - lesson 1 - overviewCoded ui - lesson 1 - overview
Coded ui - lesson 1 - overview
 
Beginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NETBeginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NET
 
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
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated Testing
 
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
 
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
 
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
 
Introduction To UnitTesting & JUnit
Introduction To UnitTesting & JUnitIntroduction To UnitTesting & JUnit
Introduction To UnitTesting & JUnit
 
Industrialization of Android Development (Concept)
Industrialization of Android Development (Concept)Industrialization of Android Development (Concept)
Industrialization of Android Development (Concept)
 
Csharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul YaoCsharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul Yao
 
Alexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extraAlexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extra
 
VB.Net GUI Unit_01
VB.Net GUI Unit_01VB.Net GUI Unit_01
VB.Net GUI Unit_01
 
Unit Tests? It is Very Simple and Easy!
Unit Tests? It is Very Simple and Easy!Unit Tests? It is Very Simple and Easy!
Unit Tests? It is Very Simple and Easy!
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 
Writing Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkWriting Tests with the Unity Test Framework
Writing Tests with the Unity Test Framework
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester Training
 
Inventory your network and clients with PowerShell
Inventory your network and clients with PowerShellInventory your network and clients with PowerShell
Inventory your network and clients with PowerShell
 
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 

More from Gaurav Arora

Test driven development
Test driven developmentTest driven development
Test driven developmentGaurav Arora
 
ASP NET MVC Series For Beginers Part 2
ASP NET MVC Series For Beginers Part 2ASP NET MVC Series For Beginers Part 2
ASP NET MVC Series For Beginers Part 2Gaurav Arora
 
ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1Gaurav Arora
 
Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Gaurav Arora
 
Silverlight Demos For Beginners
Silverlight Demos For BeginnersSilverlight Demos For Beginners
Silverlight Demos For BeginnersGaurav Arora
 
Wcf Transaction Handling
Wcf Transaction HandlingWcf Transaction Handling
Wcf Transaction HandlingGaurav Arora
 

More from Gaurav Arora (6)

Test driven development
Test driven developmentTest driven development
Test driven development
 
ASP NET MVC Series For Beginers Part 2
ASP NET MVC Series For Beginers Part 2ASP NET MVC Series For Beginers Part 2
ASP NET MVC Series For Beginers Part 2
 
ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1
 
Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1
 
Silverlight Demos For Beginners
Silverlight Demos For BeginnersSilverlight Demos For Beginners
Silverlight Demos For Beginners
 
Wcf Transaction Handling
Wcf Transaction HandlingWcf Transaction Handling
Wcf Transaction Handling
 

Recently uploaded

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 

Unit Testing Using N Unit

  • 1. Unit Testing using NunitIntroduction to Art of Testing Presenter: GauravArora Email: admin@hyderabadtechies.info Note: This presentation is presented with courtesy of HyderabadTechies.info
  • 2. Topics What is unit testing? Step-by-step Overview What is Nunit? Hands-on using Nunit
  • 3. What is unit testing? Unit Testing is a way/method by which individual units of source code/application are tested to determine if they are fit for use. In other words, we can say method by which individual test one thing at a time [i.e. units] without touching external sources [DB, external files, libraries etc.]
  • 4.
  • 5. Everyone who is a team member
  • 6.
  • 7.
  • 8. What is Nunit? Nunit is unit-testing framework and supports all .Net languages. It has been written entirely in C# [csharp]. Refer - http://www.nunit.org/
  • 9. Start with Nunit Before start, we need nUnit framework: Download from : http://www.nunit.org/index.php?p=download http://sourceforge.net/projects/nunit/ [after download, install per your choice, not going in details of this chapter here…] For more info : http://www.nunit.org/
  • 10. Pictorial Flow of Nunit nUnit Dll, exe file XML file (Optional) Processing details on the GUI or Command prompt Image : showing [Input & Output]
  • 11.
  • 12.
  • 13. Add references to your project
  • 15.
  • 16.
  • 17. Select a Class Library project [why choose class library, we are creating a separate project for our tests]
  • 18. Add reference of nunit.framework.dll in your project
  • 19.
  • 20. Hands-on: BMI Test-Structure Using TestFixture Attribute Test Class Setup attribute TearDown attribute Test attribute
  • 21.
  • 22. Method names are long, defining scenarios
  • 23. Attribute TestFixture tells the fixture of test class
  • 24.
  • 25. Lets take a look on Code!
  • 26. Nunit : CUI Console mode is one of the modes available of Nunit, lets discuss how to run from command [console window]: The command to execute the exe in console mode is nunit-console.exe [filename] [option]
  • 27. Nunit : CUI - Output
  • 28. Nunit : CUI - Options *Options /Fixture=STR Fixture to test /config=STR project configuration to load /XML=STR Name of XML output file /transform=STR name of transform file /xmlConsoledisplay XML to the console /output=STR File to receive test output (short :/out=STR) /err=STR File to receive test error output /labels Label each test in stdout /include = STR list of categories to include /exclude = STR list of categories to exclude /noshadow disable shadow option /thread runs thread on a separate thread /wait waitfor input before closing console window /nologoDo not display the logo /help Display help (short format: /?)
  • 29. Nunit : GUI Go to your installed path of nunit framework and from bin folder select ‘nunit.exe’ If you installed nunit from msi package just go to program and select Nunit
  • 30. Nunit : Load Test
  • 31. Nunit : Test Result
  • 32. Lets take a look on Nunit GUI
  • 33.
  • 34. “Test-Driven Development in Microsoft .NET” – James Newkirk
  • 35.