SlideShare a Scribd company logo
NUnit
UT Framework
NUnit Features
Multiple
Assemblies
Categories
Assertions
Configuration
Files
Useful
Test
Cases
Test
Environment
Theory
NUnit
Multiple Assemblies
Configuration Files
Useful Test Cases
Assertions
Categories
Test Environment
Theory
NUnit
Multiple Assemblies
Configuration Files
Useful Test Cases
Assertions
When categories are used, only the
tests in the selected categories will be
run.
■ TestFixture Syntax
[TestFixture]
[Category LongRunning“)]
public class Tests
■ Test Syntax
Test]
[Category Long“)]
public void VeryLongTest
Categories Categories
Test Environment
Theory
NUnit
Multiple Assemblies
Configuration Files
Useful Test Cases
Assertions
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
Categories
Multiple Assemblies
Test Environment
Theory
NUnit
Multiple Assemblies
Configuration Files
Useful Test Cases
Assertions
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.
Categories
Configuration Files
Test Environment
Theory
NUnit
Multiple Assemblies
Configuration Files
Useful Test Cases
Assertions
You can use many attributes to run
a single test with different
parameters:
■ TestCase
■ A single set of parameters per attribute.
■ Range, Random, Values
■ Multiple simple-typed parameters.
■ TestCaseSource,
ValueSource
■ Use a public property or a void Method to
transfer parameters.
Categories Useful Test
Cases
Test Environment
Theory
NUnit
Multiple Assemblies
Configuration Files
Useful Test Cases
Assertions
NUnit Provide many types of
assertions:
■ Equality
■ AreEqual, AreNotEqual
■ Identity
■ AreSame, AreNotSame, Contains
■ Condition
■ IsTure, IsFalse, IsNull, IsNaN, IsEmpty,
IsNotEmpty
■ Comparison
■ Greater, Less, IsIsnstanceOf, IsAssignableFrom
■ CustomAsserts
■ That, FluentAssertions
■ Strings, Exceptions, You name it!
Categories
Assertions
Test Environment
Theory
NUnit
Multiple Assemblies
Configuration Files
Useful Test Cases
Assertions
There are some useful attributes that
affect the test Environment:
■ Ignore & Explicit
■ Both tests will not be run, though Explicit tests
can be ran when you run them yourself
■ Platform
■ used to specify platforms for which a test or
fixture should be run.
■ RequiresThread
■ used to indicate that a test method, class or
assembly should be run on a separate thread
Categories
Test
Environment
Test Environment
Theory
NUnit
Multiple Assemblies
Configuration Files
Useful Test Cases
Assertions
A Theory is a special type of test,
used to verify a general statement
about the system under development:
■ Assume & DataPoint
■ Theories are base on assumptions and
facts(DataPoints), opposing to normal tests that
are based on examples.
■ Assertions
■ If any Assertion fails, the Theory itself fails.
■ If at least some cases pass the
stated assumptions, and there
are no assertion failures or
exceptions, then the Theory passes
Categories
Theory
Test Environment
Theory
Questions?

More Related Content

What's hot

An Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnitAn Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnit
weili_at_slideshare
 
Robot framework and selenium2 library
Robot framework and selenium2 libraryRobot framework and selenium2 library
Robot framework and selenium2 library
krishantha_samaraweera
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDD
Dror Helper
 
Unit Testing (C#)
Unit Testing (C#)Unit Testing (C#)
Unit Testing (C#)
Prashant Cholachagudd
 
Robot Framework
Robot FrameworkRobot Framework
Robot Framework
Onur Baskirt
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot Framework
Somkiat Puisungnoen
 
Unit Testing Using N Unit
Unit Testing Using N UnitUnit Testing Using N Unit
Unit Testing Using N Unit
Gaurav Arora
 
Hướng dẫn sử dụng Selenium ide
Hướng dẫn sử dụng Selenium ideHướng dẫn sử dụng Selenium ide
Hướng dẫn sử dụng Selenium ide
Thiện Dương
 
Automation Testing & TDD
Automation Testing & TDDAutomation Testing & TDD
Automation Testing & TDD
Nhật Nguyễn Khắc
 
Slide đồ án kiểm thử PM
Slide đồ án kiểm thử PMSlide đồ án kiểm thử PM
Slide đồ án kiểm thử PM
Nguyễn Anh
 
Introduction to Robot Framework – Exove
Introduction to Robot Framework – ExoveIntroduction to Robot Framework – Exove
Introduction to Robot Framework – Exove
Exove
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
Joe Tremblay
 
Code Refactoring: Thay đổi nhỏ - Lợi ích lớn
Code Refactoring: Thay đổi nhỏ - Lợi ích lớnCode Refactoring: Thay đổi nhỏ - Lợi ích lớn
Code Refactoring: Thay đổi nhỏ - Lợi ích lớn
Nhật Nguyễn Khắc
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
Khaja Moiz Uddin
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best Practices
Derek Smith
 
TDD (Test-Driven Development)
TDD (Test-Driven Development)TDD (Test-Driven Development)
TDD (Test-Driven Development)
Renato Groff
 
Unit testing best practices
Unit testing best practicesUnit testing best practices
Unit testing best practicesnickokiss
 
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
 

What's hot (20)

An Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnitAn Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnit
 
Unit Test
Unit TestUnit Test
Unit Test
 
Robot framework and selenium2 library
Robot framework and selenium2 libraryRobot framework and selenium2 library
Robot framework and selenium2 library
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDD
 
Unit Testing (C#)
Unit Testing (C#)Unit Testing (C#)
Unit Testing (C#)
 
Robot Framework
Robot FrameworkRobot Framework
Robot Framework
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot Framework
 
Unit Testing Using N Unit
Unit Testing Using N UnitUnit Testing Using N Unit
Unit Testing Using N Unit
 
Hướng dẫn sử dụng Selenium ide
Hướng dẫn sử dụng Selenium ideHướng dẫn sử dụng Selenium ide
Hướng dẫn sử dụng Selenium ide
 
Automation Testing & TDD
Automation Testing & TDDAutomation Testing & TDD
Automation Testing & TDD
 
Slide đồ án kiểm thử PM
Slide đồ án kiểm thử PMSlide đồ án kiểm thử PM
Slide đồ án kiểm thử PM
 
Introduction to Robot Framework – Exove
Introduction to Robot Framework – ExoveIntroduction to Robot Framework – Exove
Introduction to Robot Framework – Exove
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Code Refactoring: Thay đổi nhỏ - Lợi ích lớn
Code Refactoring: Thay đổi nhỏ - Lợi ích lớnCode Refactoring: Thay đổi nhỏ - Lợi ích lớn
Code Refactoring: Thay đổi nhỏ - Lợi ích lớn
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best Practices
 
TDD (Test-Driven Development)
TDD (Test-Driven Development)TDD (Test-Driven Development)
TDD (Test-Driven Development)
 
Unit testing best practices
Unit testing best practicesUnit testing best practices
Unit testing best practices
 
Giáo trình Tester Full
Giáo trình Tester FullGiáo trình Tester Full
Giáo trình Tester Full
 

Viewers also liked

Introduction to nsubstitute
Introduction to nsubstituteIntroduction to nsubstitute
Introduction to nsubstitute
Suresh Loganatha
 
How and what to unit test
How and what to unit testHow and what to unit test
How and what to unit test
Eugenio Lentini
 
What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3Asher Sterkin
 
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 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
Maarten Balliauw
 
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
Maarten Balliauw
 
טלפונים חכמים ואתם
טלפונים חכמים ואתםטלפונים חכמים ואתם
טלפונים חכמים ואתםIdan ofek
 
Code quality as a built-in process
Code quality as a built-in processCode quality as a built-in process
Code quality as a built-in process
Elad Maimon
 
Developing NuGet
Developing NuGetDeveloping NuGet
Developing NuGet
Jeff Handley
 
Guice - dependency injection framework
Guice - dependency injection frameworkGuice - dependency injection framework
Guice - dependency injection framework
Evgeny Barabanov
 
1953 and all that. A tale of two sciences (Kitcher, 1984)
1953 and all that. A tale of two sciences (Kitcher, 1984)1953 and all that. A tale of two sciences (Kitcher, 1984)
1953 and all that. A tale of two sciences (Kitcher, 1984)
Yoav Francis
 
xUnit Test Patterns Chapter 20
xUnit Test Patterns Chapter 20xUnit Test Patterns Chapter 20
xUnit Test Patterns Chapter 20Hiroyuki Ohnaka
 
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
SOASTA
 
Garbage collected teardown
Garbage collected teardownGarbage collected teardown
Garbage collected teardownHiroyuki Ohnaka
 
Little productivity tools every developer should use
Little productivity tools every developer should useLittle productivity tools every developer should use
Little productivity tools every developer should use
Dennis Doomen
 
מכתב המלצה - לירן פרידמן
מכתב המלצה - לירן פרידמןמכתב המלצה - לירן פרידמן
מכתב המלצה - לירן פרידמןLiran Fridman
 
Negative Testing
Negative TestingNegative Testing
Negative Testing
Mindfire Solutions
 
Roy Osherove TDD From Scratch
Roy Osherove TDD From ScratchRoy Osherove TDD From Scratch
Roy Osherove TDD From ScratchRoy Osherove
 
Unit Testing, TDD and ATDD
Unit Testing, TDD and ATDDUnit Testing, TDD and ATDD
Unit Testing, TDD and ATDD
Arnon Axelrod
 

Viewers also liked (20)

Nunit
NunitNunit
Nunit
 
Introduction to nsubstitute
Introduction to nsubstituteIntroduction to nsubstitute
Introduction to nsubstitute
 
How and what to unit test
How and what to unit testHow and what to unit test
How and what to unit test
 
What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3
 
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 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
 
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
 
טלפונים חכמים ואתם
טלפונים חכמים ואתםטלפונים חכמים ואתם
טלפונים חכמים ואתם
 
Code quality as a built-in process
Code quality as a built-in processCode quality as a built-in process
Code quality as a built-in process
 
Developing NuGet
Developing NuGetDeveloping NuGet
Developing NuGet
 
Guice - dependency injection framework
Guice - dependency injection frameworkGuice - dependency injection framework
Guice - dependency injection framework
 
1953 and all that. A tale of two sciences (Kitcher, 1984)
1953 and all that. A tale of two sciences (Kitcher, 1984)1953 and all that. A tale of two sciences (Kitcher, 1984)
1953 and all that. A tale of two sciences (Kitcher, 1984)
 
xUnit Test Patterns Chapter 20
xUnit Test Patterns Chapter 20xUnit Test Patterns Chapter 20
xUnit Test Patterns Chapter 20
 
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
 
Garbage collected teardown
Garbage collected teardownGarbage collected teardown
Garbage collected teardown
 
Little productivity tools every developer should use
Little productivity tools every developer should useLittle productivity tools every developer should use
Little productivity tools every developer should use
 
מכתב המלצה - לירן פרידמן
מכתב המלצה - לירן פרידמןמכתב המלצה - לירן פרידמן
מכתב המלצה - לירן פרידמן
 
Negative Testing
Negative TestingNegative Testing
Negative Testing
 
Roy Osherove TDD From Scratch
Roy Osherove TDD From ScratchRoy Osherove TDD From Scratch
Roy Osherove TDD From Scratch
 
Unit Testing, TDD and ATDD
Unit Testing, TDD and ATDDUnit Testing, TDD and ATDD
Unit Testing, TDD and ATDD
 

Similar to NUnit Features Presentation

TestNG introduction
TestNG introductionTestNG introduction
TestNG introductionDenis Bazhin
 
testng
testngtestng
Testing with Junit4
Testing with Junit4Testing with Junit4
Testing with Junit4
Amila Paranawithana
 
Test Driven Development with Sql Server
Test Driven Development with Sql ServerTest Driven Development with Sql Server
Test Driven Development with Sql Server
David P. Moore
 
Unit testing basics with NUnit and Visual Studio
Unit testing basics with NUnit and Visual StudioUnit testing basics with NUnit and Visual Studio
Unit testing basics with NUnit and Visual Studio
Amit Choudhary
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementations
Steven Li
 
Unit Testing in .NET Core 7.0 with XUnit.pptx
Unit Testing in .NET Core 7.0 with XUnit.pptxUnit Testing in .NET Core 7.0 with XUnit.pptx
Unit Testing in .NET Core 7.0 with XUnit.pptx
Knoldus Inc.
 
Test case management with MTM 2013
Test case management with MTM 2013Test case management with MTM 2013
Test case management with MTM 2013
Raluca Suditu
 
.Net Unit Testing with Visual Studio 2010
.Net Unit Testing with Visual Studio 2010.Net Unit Testing with Visual Studio 2010
.Net Unit Testing with Visual Studio 2010
kgayda
 
Test Case Management with MTM 2013
Test Case Management with MTM 2013Test Case Management with MTM 2013
Test Case Management with MTM 2013Raluca Suditu
 
TestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit TestingTestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit Testing
Bethmi Gunasekara
 
Skillwise Unit Testing
Skillwise Unit TestingSkillwise Unit Testing
Skillwise Unit Testing
Skillwise Group
 
Cpp unit
Cpp unit Cpp unit
Cpp unit
mudabbirwarsi
 
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)
 
Testing 101
Testing 101Testing 101
Testing 101
Elango Balusamy
 
Principles and patterns for test driven development
Principles and patterns for test driven developmentPrinciples and patterns for test driven development
Principles and patterns for test driven development
Stephen Fuqua
 
JUnit5 Custom TestEngines intro - version 2020-06
JUnit5 Custom TestEngines intro - version 2020-06JUnit5 Custom TestEngines intro - version 2020-06
JUnit5 Custom TestEngines intro - version 2020-06
Sven Ruppert
 
TestNG Session presented in PB
TestNG Session presented in PBTestNG Session presented in PB
TestNG Session presented in PB
Abhishek Yadav
 

Similar to NUnit Features Presentation (20)

TestNG introduction
TestNG introductionTestNG introduction
TestNG introduction
 
testng
testngtestng
testng
 
Testing with Junit4
Testing with Junit4Testing with Junit4
Testing with Junit4
 
Test Driven Development with Sql Server
Test Driven Development with Sql ServerTest Driven Development with Sql Server
Test Driven Development with Sql Server
 
Unit testing basics with NUnit and Visual Studio
Unit testing basics with NUnit and Visual StudioUnit testing basics with NUnit and Visual Studio
Unit testing basics with NUnit and Visual Studio
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementations
 
Unit Testing in .NET Core 7.0 with XUnit.pptx
Unit Testing in .NET Core 7.0 with XUnit.pptxUnit Testing in .NET Core 7.0 with XUnit.pptx
Unit Testing in .NET Core 7.0 with XUnit.pptx
 
Test case management with MTM 2013
Test case management with MTM 2013Test case management with MTM 2013
Test case management with MTM 2013
 
Junit
JunitJunit
Junit
 
.Net Unit Testing with Visual Studio 2010
.Net Unit Testing with Visual Studio 2010.Net Unit Testing with Visual Studio 2010
.Net Unit Testing with Visual Studio 2010
 
Test Case Management with MTM 2013
Test Case Management with MTM 2013Test Case Management with MTM 2013
Test Case Management with MTM 2013
 
TestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit TestingTestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit Testing
 
Skillwise Unit Testing
Skillwise Unit TestingSkillwise Unit Testing
Skillwise Unit Testing
 
Test ng
Test ngTest ng
Test ng
 
Cpp unit
Cpp unit Cpp unit
Cpp unit
 
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
 
Testing 101
Testing 101Testing 101
Testing 101
 
Principles and patterns for test driven development
Principles and patterns for test driven developmentPrinciples and patterns for test driven development
Principles and patterns for test driven development
 
JUnit5 Custom TestEngines intro - version 2020-06
JUnit5 Custom TestEngines intro - version 2020-06JUnit5 Custom TestEngines intro - version 2020-06
JUnit5 Custom TestEngines intro - version 2020-06
 
TestNG Session presented in PB
TestNG Session presented in PBTestNG Session presented in PB
TestNG Session presented in PB
 

Recently uploaded

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 

Recently uploaded (20)

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 

NUnit Features Presentation

  • 3. NUnit Multiple Assemblies Configuration Files Useful Test Cases Assertions Categories Test Environment Theory
  • 4. NUnit Multiple Assemblies Configuration Files Useful Test Cases Assertions When categories are used, only the tests in the selected categories will be run. ■ TestFixture Syntax [TestFixture] [Category LongRunning“)] public class Tests ■ Test Syntax Test] [Category Long“)] public void VeryLongTest Categories Categories Test Environment Theory
  • 5. NUnit Multiple Assemblies Configuration Files Useful Test Cases Assertions 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 Categories Multiple Assemblies Test Environment Theory
  • 6. NUnit Multiple Assemblies Configuration Files Useful Test Cases Assertions 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. Categories Configuration Files Test Environment Theory
  • 7. NUnit Multiple Assemblies Configuration Files Useful Test Cases Assertions You can use many attributes to run a single test with different parameters: ■ TestCase ■ A single set of parameters per attribute. ■ Range, Random, Values ■ Multiple simple-typed parameters. ■ TestCaseSource, ValueSource ■ Use a public property or a void Method to transfer parameters. Categories Useful Test Cases Test Environment Theory
  • 8. NUnit Multiple Assemblies Configuration Files Useful Test Cases Assertions NUnit Provide many types of assertions: ■ Equality ■ AreEqual, AreNotEqual ■ Identity ■ AreSame, AreNotSame, Contains ■ Condition ■ IsTure, IsFalse, IsNull, IsNaN, IsEmpty, IsNotEmpty ■ Comparison ■ Greater, Less, IsIsnstanceOf, IsAssignableFrom ■ CustomAsserts ■ That, FluentAssertions ■ Strings, Exceptions, You name it! Categories Assertions Test Environment Theory
  • 9. NUnit Multiple Assemblies Configuration Files Useful Test Cases Assertions There are some useful attributes that affect the test Environment: ■ Ignore & Explicit ■ Both tests will not be run, though Explicit tests can be ran when you run them yourself ■ Platform ■ used to specify platforms for which a test or fixture should be run. ■ RequiresThread ■ used to indicate that a test method, class or assembly should be run on a separate thread Categories Test Environment Test Environment Theory
  • 10. NUnit Multiple Assemblies Configuration Files Useful Test Cases Assertions A Theory is a special type of test, used to verify a general statement about the system under development: ■ Assume & DataPoint ■ Theories are base on assumptions and facts(DataPoints), opposing to normal tests that are based on examples. ■ Assertions ■ If any Assertion fails, the Theory itself fails. ■ If at least some cases pass the stated assumptions, and there are no assertion failures or exceptions, then the Theory passes Categories Theory Test Environment Theory

Editor's Notes

  1. Today We will talk about the features and unique aspects of the NUnit Framework.*To those of you who are totally new to NUnit*NUnit is an open source unit testing framework for Microsoft .NET.It serves the same purpose as JUnit does in the Java world, and is one of many programs in the xUnit family.
  2. So, except for the basic functionality of the framework (for an example running a test, having a test class/ fixture , etc…) it has some really powerful features.Some of the features are unique to NUnit.Some are also implemented in other frameworks but not as fluent and easy to use as they are in NUnit.In this presentation, I will talk about the most powerful features of the framework.
  3. Transition
  4. NUnit allows tests to be categorized by topic.Instead of running a test session based on a test fixture, why not run tests by categories?For an example:If I want to run only the tests that test “Edge Case” Issues, and I have categorized the tests as such, I don’t need to add ignore attributes on tests.I will simply need to specify the “Edge Case” Category to be ran and all the other tests will be excluded from the session.It can be either applied on a single test case or a whole test fixture!Plus, it makes the test class more readable if you can nest it under a certain topic.
  5. A Brilliant feature is the ability to run tests from multiple assemblies at once.Most of you will not find it that interesting.But! Think of it. You want to check the integration of few components and need to test it.It allows you to run the tests of each component and the integrative test between them all at a single session!
  6. This is a feature that also exists in MSTest but the big difference is that NUnit does it better.Faster Reading of Configuration, Better presentation of parameterized tests, and many more advantages.
  7. NUnit provides many neat test case sources- whether it’s a single test case, a range of values or simply cases read from an external source.You can read more about it at Luke Wickstead – How To NUnit: Features @ http://lukewickstead.wordpress.com/2013/02/09/howto-nunit-features/
  8. One of the more fluent and readable advantages of NUnit is the assertions.NUnit has many types of assertions that allow easy and very easy to understand assertions.There are also some add-ins that allow truly fluent assertionFind out more on Luke Wickstead – How To NUnit: Assertions @ http://lukewickstead.wordpress.com/2013/02/09/howto-nunit-assertions/
  9. NUnit also allows you to control the test environment without any need to change the test itself.You may either ignore or decide whether the test should be ran (Ignore and Explicit).You may also choose the platform that the test will be ran at (for list of supported platforms, go to http://www.nunit.org/index.php?p=platform&r=2.2.10)And even require a test to be ran on a different thread so the tests will work in parallel. (default, the tests run on a single thread.)
  10. Theories is a very complex issue.Apparently, it seems as the theory is a normal test. But it is a very special test.The theory is based on assumptions and data points that allow you to test a theoretical matter, rather then an actual fact that has examples.NUnit have a really good example for it on their website @ http://nunit.org/index.php?p=theory&r=2.5
  11. That’s it for today people!If you want to ask me questions, simply mail me to Shirbr510@gmail.com and write in the subject “NUnit Presentation Questions”Till Next Time, Shir.