INF3705
Assignment 2 2024
Detailed Solutions, References & Explanations
Unique number:
Due Date: 6 September 2024
QUESTION 1 2024
Development testing and Test-driven development (TDD) are both integral components of
modern software development processes, yet they serve distinct roles and represent
different approaches to ensuring software quality. Understanding the nuances between the
two can help in recognizing how each contributes to the development lifecycle.
Development Testing:
Development testing encompasses a broad spectrum of testing activities performed by
the development team to ensure the system meets the specified requirements and
functions as intended. This includes unit testing, component testing, and system testing
Terms of use
By making use of this document you agree to:
• Use this document as a guide for learning, comparison and reference purpose,
• Not to duplicate, reproduce and/or misrepresent the contents of this document as your own work,
• Fully accept the consequences should you plagiarise or misuse this document.
Disclaimer
Extreme care has been used to create this document, however the contents are provided “as is” without
any representations or warranties, express or implied. The author assumes no liability as a result of
reliance and use of the contents of this document. This document is to be used for comparison, research
and reference purposes ONLY. No part of this document may be reproduced, resold or transmitted in any
form or by any means.
, +27 67 171 1739
QUESTION 1
Development testing and Test-driven development (TDD) are both integral
components of modern software development processes, yet they serve distinct roles
and represent different approaches to ensuring software quality. Understanding the
nuances between the two can help in recognizing how each contributes to the
development lifecycle.
Development Testing:
Development testing encompasses a broad spectrum of testing activities performed
by the development team to ensure the system meets the specified requirements and
functions as intended. This includes unit testing, component testing, and system
testing:
• Unit Testing involves testing individual units or components of a software
application in isolation (e.g., methods or classes) to ensure each part works
correctly.
• Component Testing takes the process a step further by integrating several units
and testing them as a whole, focusing on the interfaces and interaction between
these components.
• System Testing deals with the evaluation of the integrated system as a whole,
ensuring that the complete system meets the predefined requirements and
works correctly across all components.
The primary aim of development testing is to identify defects within the software from
the smallest units of code up to the full integrated system before the software is
released. It ensures the functional and non-functional aspects of the system are in line
with the requirements.
Test-driven Development (TDD):
Disclaimer
Extreme care has been used to create this document, however the contents are provided “as is” without
any representations or warranties, express or implied. The author assumes no liability as a result of
reliance and use of the contents of this document. This document is to be used for comparison, research
and reference purposes ONLY. No part of this document may be reproduced, resold or transmitted in any
form or by any means.
, +27 67 171 1739
Test-driven development, on the other hand, is a methodology where tests are written
before the actual code. It's a cyclical process that starts with writing a test for a new
function or improvement, then writing the minimal amount of code necessary to pass
the test, and subsequently refactoring the new code to acceptable standards. Here
are the core steps involved in TDD:
1. Identify the functionality required and write a test for it before any new code is
developed.
2. Implement the test as an automated test that initially fails because the
functionality does not yet exist.
3. Write the code required to pass the test
4. Refactor the new code to improve its structure and efficiency without altering
its behavior.
Differences Between Development Testing and TDD:
• Approach and Timing: In development testing, testing activities occur after the
software component or system has been developed. TDD inverts this approach
by requiring tests to be written prior to the code itself.
• Focus: Development testing focuses on verifying that the software meets
specified requirements and functions as intended at different levels (unit,
component, system). TDD, while ultimately aiming for the same goals, focuses
on continuously improving both the quality of the code and the product through
iterative testing and coding cycles.
• Role in Development Process: Development testing is often seen as a phase
or set of activities within the broader software development lifecycle. TDD is a
development methodology that integrates testing as a fundamental and
continuous part of writing software.
• Benefits: Both approaches offer significant benefits, but they highlight different
aspects. Development testing ensures that all parts of the system are tested
and meet the requirements, enhancing reliability and functionality. TDD
champions code quality and design, frequent testing, and early bug detection,
promoting a more agile development process.
Disclaimer
Extreme care has been used to create this document, however the contents are provided “as is” without
any representations or warranties, express or implied. The author assumes no liability as a result of
reliance and use of the contents of this document. This document is to be used for comparison, research
and reference purposes ONLY. No part of this document may be reproduced, resold or transmitted in any
form or by any means.