logo

Unit Testing for MultiFunctionPrinter

   

Added on  2023-06-12

9 Pages2205 Words222 Views
<Project 1>
Unit Test
<Version>
<Date>
<Your Name>

<Project 1>
Table of Contents
1. Unit Test 1
1.1 APPROACH 1
1.2 100% CODE COVERAGE TEST CASES 3
1.2.1 Test Case 1 3
1.2.2 Test Case 2 3
1.2.3 Test Case 3 3
1.3 ADDITIONAL TEST CASES FOR DATA COVERAGE 4
1.3.1 Test Case 1 4
1.3.2 Test Case 2 4
1.3.3 Test Case 3 4
2. DEFECTS 5
2.1 DEFECTS 5
2.1.1 Defect 1 5
2.1.2 Defect 2 5
Software Unit Test Page ii

<Project 1>
1. Unit Test
1.1 Approach
Unit testing is a software testing, that is done as the first level testing. The testing focuses on
testing individual functions, methods or component of a software, using a White Box Testing
approach (Beck & Gamma, 2004). With unit testing the smallest testable software component is
subjected to specific tests using carefully selected inputs and is characterized with having a
single output only (Beck & Gamma, 2004).
To carry out unit testing, one has to design tests that aim to test the smallest testable code units of
a software (Marick, 1995). In this case, the smallest testable unit is a method within a class. The
goals and objectives of unit testing is to identify failures at the functions level and help in
improving the quality of code (Marick, 1995). The test approach seeks to verify if a given
function, given a set of carefully selected data inputs, is able to process and return proper values,
and whether it can handle failures gracefully (Wick, Stevenson, & Wagner, 2005).
In big software projects, testing all the functions of a program is not possible, as such,
completion of unit test is determined by set levels or acceptable percentage of code that has to be
tested before integration can commence.
Unit testing is essentially a white-box testing approach (Wick, Stevenson, & Wagner, 2005).
White-Box testing focuses on verifying the internal implementation/design or structure of a
software; with white-box testing, inputs are choses to verify the internal working of a program's
code (Wick, Stevenson, & Wagner, 2005).
Code coverage refers to the percentage of program code that is covered through automated
testing (Choudhury et.al, 2017). The measure estimates the amount of code executed during a
test run. As highlighted before, performing unit tests on all functions of a big software is
impossible, as such, an acceptable level of coverage has to be set. The acceptable level of tests is
verified through code coverage (Choudhury et.al, 2017). It helps in knowing if acceptable levels
have been achieved or more tests are needed. It also aids in avoiding test entropy (Choudhury
et.al, 2017). On the other hand, data coverage Is an analysis that helps in determining if auto
generated data is sufficient for performing all tests.
Software Unit Test Page 1

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
ICT TESTING 01 -- Overview
|8
|2322
|489

Software Testing: Types, Approaches, Plan, Cases, Logs, Results
|15
|1230
|76

Introduction to Test Automation Article 2022
|5
|1383
|14

Project Controls and Testing Application 2022
|4
|660
|20