0% found this document useful (0 votes)
21 views13 pages

Nunit

Uploaded by

anuproyal24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views13 pages

Nunit

Uploaded by

anuproyal24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

COMP311

Software Testing & Quality Assurance


Research assignment – Unit Test tools
Group Members:
Kritika
Jasmeen
Shusan Pariyar
Project Agenda: Unit/Integration
Testing Tools Across Multiple
Languages
1. INTRODUCTION TO UNIT TESTING.

2 . O V E RV I E W O F T O O L S A C R O S S
LANGUAGES.

3 . D E TA I L E D F O C U S O N S P E C I F I C
TOOL.

4 . F E AT U R E S A N D B E N E F I T S O F
TOOL.

5. HOW TO USE THE TOOL.

6 . A D V A N TA G E S O F U S I N G
U N I T / I N T E G R AT I O N T E S T I N G T O O L S .

7 . C O N C LU S I O N .
Purpose: This presentation covers unit and
integration testing tools across multiple
programming languages such as Java, C#, C++,
etc. It explores the features, uses, and
installation.

Importance of Testing: Testing is crucial to


ensure the correctness and quality of software
applications. Unit testing checks individual
components, while integration testing ensures
that combined components function properly.

Unit testing is a software testing technique in which


individual components or units of code are tested in
isolation to ensure they function correctly. The "unit" is
typically the smallest part of an application that can be
tested, such as a single function, method, or class. The
purpose of unit testing is to validate that each unit
performs as expected, even when used independently of
Unit Testing Frameworks are pivotal in
the software development
process, providing a mechanism for
developers to verify each part of the
software by running tests on individual
units of code.

Advantages of Using Unit Testing


Tools

Increased Code Quality:


Automated tests help detect defects
early, particularly for database logic
that is critical in enterprise
applications.
Refactoring Confidence: With
reliable test cases, database changes
can be made with confidence,
knowing the tests will catch any
regressions.
Documentation: Well-written tests
can serve as living documentation for
the database code.
Testing Tools Overview

Language Unit Testing Integration


Tool Testing Tool
Java JUnit, TestNG Cactus, Rational
Functional
Tester
C# NUnit, MSTest Visual Studio
Unit Test,
SpecFlow
C/C++ CppUnit TestNG, CUnit
JavaScript Jasmine, Karma
Mocha, QUnit
Ruby RSpec Test::Unit
Python unittest.mock,
pyunit, pytest behave
PHP PHPUnit Behat
SQL SQLUnit PL/SQL
Developer Tools
Tool Focus: NUnit (C#)

What is NUnit?

•NUnit is an open source unit-testing framework for


all .NET languages.It is basically same as JUNIT in Java. It
brings the power of unit testing to .NET programs and has
become the most popular .NET unit testing framework. It
is compatible with Visual studio and Selenium WebDriver.

•It is inspired by JUnit and is part of the xUnit family of testing


frameworks.

Features of NUnit:

•Supports data-driven tests

•Flexible assertions

•Parallel test execution


. How NUnit is Useful for Companies

NUnit tests run quickly, allowing developers to identify and fix


Faster Bug Detection bugs early in the development cycle, reducing long-term
costs.

With NUnit tests, developers ensure that each unit of the


Improves Code Quality application performs as expected. This helps prevent new
changes from breaking existing functionality.

NUnit integrates well with CI/CD pipelines, automatically


running tests whenever new code is pushed. This ensures that
Supports Continuous Integration only code that passes the tests gets integrated, reducing the
risk of defects.

Detecting and fixing bugs early using automated testing is


significantly cheaper than fixing them later in production.
Cost Savings Additionally, with robust test coverage, fewer manual tests
are required, saving time and resources.
How to Use
and install
NUnit

Available Through Steps to Install


NuGet Package NUnit:
Manager: • Open Visual Studio.
• NUnit can be installed easily • In Solution Explorer, right-
through NuGet, a package click on your project and
management tool for .NET. It select Manage NuGet
allows you to add, update, Packages.
1. Installation of and remove libraries in your • In the Browse tab, search
Visual Studio projects. for NUnit.
NUnit • Select the NUnit package
from the search results and
click Install.
• Optionally, install
NUnit3TestAdapter to
integrate NUnit tests with
the Test Explorer in Visual
Studio (for easier test
execution).
After installation, Ensure that your test Creating Your First Create a Test
2. Setting reference NUnit in project references NUnit Test Class: Project: If you
Up NUnit your test project. the project or library
you want to test.
haven't already,
create a new test
for Your project in Visual
Studio (File > New >
Project Project > NUnit Test
Project).

Add a class file to your 3. Writing Unit NUnit follows a simple


test project (e.g., Tests Using NUnit syntax using
PrimeServiceTests.cs). attributes to define
test methods, setup
methods, and
teardown methods.
Prime number Test Runs For Nunit
Similar Tool :
utPLSQL
(Oracle)
•What is utPLSQL?

•utPLSQL is a testing framework for PL/SQL code, allowing unit testing


directly within the Oracle database environment.

•It helps automate testing of stored procedures, functions, and


triggers.

•Features of utPLSQL:

•Simple test management using PL/SQL packages.

•Integration with continuous integration (CI) tools like Jenkins.

•Easy-to-read test results and reports.

• Real-Time Query Testing

•Companies can run SQL queries directly against a live database to


test their functionality and performance.

•This allows for immediate feedback on query results, helping to


identify issues quickly.

• Data Analysis and Reporting

•Analysts use Live SQL to extract insights from large datasets,


enabling data-driven decision-making.

•Users can write complex queries to generate reports that inform


business strategies.
•References
•SQLUnit Documentation
https://livesql.oracle.com/ords/f?p=590:10
00
•utPLSQL GitHub (
https://github.com/utPLSQL/utPLSQL)
•NUnit Documentation (https://nunit.org/)
THANK YOU

•Kritika
•301319704
•Jasmeen
•301418041
•Shusan Pariyar
•301284265

You might also like