Software Testing Assignment: Test Case Generation and Analysis Methods

Verified

Added on  2019/10/01

|3
|1018
|268
Homework Assignment
AI Summary
This software testing assignment delves into various test case generation techniques crucial for the software development lifecycle. The assignment emphasizes the importance of comprehensive testing to minimize errors and ensure software quality. It explores techniques such as error guessing, specification-based testing, and source code-based testing, including random, path-oriented, and goal-oriented approaches. The document highlights the significance of boundary value analysis and condition decision testing for achieving high code coverage. It stresses the need for generating test cases based on user requirements and coding styles to identify potential software failures. The assignment also explains the benefits of generating test cases early in the development process, enabling efficient code updates and reducing testing time. Overall, the assignment provides a detailed overview of essential software testing methodologies and their practical application.
Document Page
Software Testing
Software testing is an important phase of software development life cycle. Software testing is a
time consuming and costly process but to get a software with minimum error we have do its
testing in all aspects. To do the software testing we have to generate its test cases, predefine
expected result, and the actual result which will be only shown when we run the software and
then compare the actual result to the expected result to check weather this software fail or pass in
that particular case.
Error Guessing
Test cases are sometimes written to be failed. It fulfils the intentions when a developer wants to
find out the situations where code is expected to fail. The arduous part of error guessing
technique is to think our of the box and coming up with the situations where code can fail. In the
set of test cases (19-20) are two basic test cases that are based on error guessing technique. It is
hard to understand the structure of the file, hence variations in writing the content to a file will
help in understating the behaviour of the parser and corresponding failures.
Technique Used For Test Cases
The first technique that I will use to write my test cases is specification based test case
generation technique. In this method the test cases are generated on the basis of requirement
specification given by the user. Test Case (1-4) in the test case file are based on the technique
specified.
There will a requirement document given by the user in which there is all the necessary things
are mentioned which we have to do in the software. I choose this technique to test the software
because as it is the basic need that a software has to meet all the requirements that are give by the
user. To generate test cases using this technique, first read and understand all the requirements
given by the user, and then check on every point that the software had fulfil the user requirement
or not and on that basic the that particular test case is fail or pass. Another reason to choose this
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
technique is that the testing engineer can generate the test cases very early, as you know that the
software requirement document is given by the first and then the developer starts developing it,
as the software is developed it comes to test engineer for testing and then test engineer starts
writing the test case but in this technique test engineer can start writing test cases while the
developer are working on the software because in this case test engineer have to write the test
cases on the basis of requirement document and that is also available for the testing engineer,
other benefit of this is that it will reduce the time for software testing because the software will
be in the early phase while we can do that testing and if the software fails on any of the test cases
then it will be easy for the developer to update the code because it is easy to change the software
code when it is in early phase of developing.
Source Code Test Generation Technique
Another technique that I will use to generate test cases is source code based test generation
technique . This technique has been chosen by me is because we have given the algorithm to
develop the software and the coding have to be done on that algorithm and in this technique the
test cases generated on the basis of coding style and fulfill all the conditions of the the user that
in all situation the software will not crash and produce the appropriate result. The test case that
will generate using this technique are categorized into three parts and that are random technique,
path oriented technique and goal oriented technique. In random technique the test engineer use
its imagination and common sense to develop the test cases, as the test engineer has the idea of
the whole software and its functionality he can imagine where the software can crash and made it
a test case. In path oriented testing the test cases are develop by keeping in the mind that while
given that a particular input the software have to follow a specific path and to check this we
generate all the possible test cases by which the software cover different path for different input
Document Page
and will cover all the possible path that are situated in the software, in this the test engineer has
to check that for the given input the software has to follow a certain path and he checks that the
software follow that path or not. In goal oriented technique which is most common technique and
has to follow by every test engineer, in this we make a list of all possible output and also input
list to get desired output and then only checks that all the output are coming when input is given
to desired input or not.
Boundary Analysis Technique
Boundary value analysis is one of the most useful method available for the testing. The method
was proposed to test the boundary conditions of a proposed program. In the given test file there
are two test cases (21-22) that are basically based on boundary condition testing. In the given
scenario, boundary condition doesn’t play a vital role but used for the basic checking.
Condition Decision Testing
It is used for the branch and path coverage in the code. It is one of the easiest method of testing
to achieve higher code coverage. Main goal for tests was to cover all the possible branches in the
source code using as little different inputs as possible. In our scenario various conditions falling
under while loop switch statements and if/else can be testing using condition testing
chevron_up_icon
1 out of 3
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]