Software Quality and Testing Assignment 2: Testing Tool Analysis

Verified

Added on  2020/04/07

|17
|2288
|265
Report
AI Summary
This assignment report focuses on software quality and testing, specifically using JUnit for unit testing in Java. It begins with an executive summary outlining the importance of testing and the objective of selecting a testing tool. The report then delves into the features, components, and functionalities of JUnit, a popular unit testing framework for Java. It explains the use of assertions, test fixtures, and test runners. The report also describes the unit testing process, including white box testing, equivalence class testing, decision table testing, acceptance testing, and boundary value testing. Test cases are provided, along with screenshots demonstrating bug detection and resolution. The report concludes by summarizing the testing approach and its effectiveness, emphasizing the importance of testing techniques and the overall efficiency of the system. The assignment uses references from various sources to support the analysis and findings.
Document Page
Software Quality and Testing Assignment 2
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Executive summary
Testing is vital part and it plays a fundamental role in the field of quality assurance in
many organizations. There are many well-organized ways to achieve the testing operation. The
main objective is to select a testing tool for testing the code snippet. The features of testing tool
is found and provided, the components used in testing tool is provided and explained. The related
functionalities will be analyzed and provided. Results are provided in testing demonstration with
screenshots.
Document Page
Table of Contents
1. Introduction............................................................................................................................3
2. Features...................................................................................................................................3
3. Components............................................................................................................................3
4. Functionality...........................................................................................................................4
5. Analysis of testing approach, validity of testing approach.................................................5
6. Test case...................................................................................................................................6
7. Test demonstration.................................................................................................................6
8. Conclusion...............................................................................................................................7
Document Page
1. Introduction
The software testing is a process in which the software item is tested for detecting the bugs,
errors against needed constraints. It helps in evaluating the main features. Generally, software
testing is a kind of an activity in which it has to be done from the beginning till end. Verification
and validation process is done in testing. Testing is crucial part and it plays a central role in the
field of quality assurance in many firms. There are many efficient ways to perform the testing
operation.
The main objective is to choose a testing tool for testing the code. The features of testing tool
in the project will be explained, the components used in testing tool will be provided and the
related functionalities will be analyzed and provided. Results will be provided in testing
demonstration with screenshots.
2. Features
Unit testing helps in exploring bug
It help in keeping the tests in an independent way
The main feature f unit testing is that it validates each and every unit of the code
Individual component are tested and determined
Unit testing mainly aims at eliminating the error construction bugs
It mainly makes sure that a specific functionalities are required.
Unit testing increases the quality of the testing as it is testing unit wise and strategy
standard of unit testing is higher
3. Components
For unit testing in java, JUnit is used.
The importance of JUnit, functionalities and the features are explained below (TechBeacon,
2017).
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
JUnit
JUnit is one of the important and popular unit testing component for the java
programming language which can able to provide an easiest framework in order to run as well as
for the test scripts. It is a very simple framework to write a repeatable test cases. JUnit plays a
vital role in the improvement of test-driven improvement frameworks (Ntu.edu.sg, 2017). It is an
important member of unit testing frameworks which is collectively identified as xUnit that
created with SUnit. It works based on the observations defined. By making use of JUnit
framework observations, user can able to test the application modules and also get the testing
result in a quick manner. JUnit can be combined with Eclipse public license version 1.0 and it is
hosted on SourceForge that is used in very effective way. Basically, JUnit is connected as JAR
file at the compile time. JUnit permits to test the application modules and examine the overall
test result, easy to write the program in a very less time, spontaneous report generation, unite the
test suites and test cases and highlight them based on the user requirements (Gontu Series, 2017).
Features of JUnit
i. It includes, assertions that is used for the testing expected results. The test fixtures for
distributing the general test data and the test runners for executing the tests.
ii. Simple and quick generation of test data and test cases.
iii. Ability to reuse the existing test cases and test data in order to make a new test cases.
iv. It can support all IDEs such as Eclipse, Net Beans
v. It can promote the test driven de4velopment.
vi. It also enhance the overall productivity and decrease the production cost.
vii. Integrate the Ant with JUnit to permit the running test suites a part of the build process,
catching their output and it produce the rich color enriched reports. User can verify the
JUnit report which would immediately tell the whole unit testing status (Cs.usfca.edu,
2017).
4. Functionality
As Unit testing is implemented, it is done by using method of white box testing. Unit testing
is an initial level of testing and done before to the integration testing. The unit testing is generally
done by the software developer or their peers. For some rare cases the unit testing is performed
Document Page
by independent software testers. Using the tools called JUnit an eclipse unit testing tools.it gives
only the run time of the test cases.
The main goal of unit testing is to pick up the smallest part of testable software in the
application. The unit testing is performed with help of JUnit testing tool. It normally has one or
more inputs and produce a single output. In procedural programming, a unit test could be an
individual program, procedure and function.
Generally the unit testing contains three phases it initializes a small part of an application it
needs to test, which is also called as system under test. Then it could apply few stimulus to
system under test and finally it observes the resultant behavior. In java to test the class needs a
unit testing that can test the each and every of its public methods. The class having only one
public method.so all need to test in the same method. The unit test are implemented as classes
with test methods. All the test methods generally tests only one method of the target class. At
times, the test method could test greater than one method in the target class. If the test methods
are very big, then split the test into several test methods (Proulx and Jossey, 2009).
5. Analysis of testing approach, validity of testing approach
Analyses were made and is provided.
Unit testing is done for code developed in java. Unit testing is the testing of individual
hardware or software groups of related units. The white box testing plays important roles in unit
testing. Using white box testing, the code is validated and planned what has to be done at a very
low structural level (Schildt, n.d.).
For instance, the tester will write test code and it will call a method with certain parameters and
will confirm that the return value of this method is as projected. Generally, unit testing performs
within a component or class of a program (Shivaprasad and Prasad, 2013).
Equivalence class
The total number of equivalence class testing done are provided. A good test case
discovers a various class of errors that has been discovered by prior test cases. Equivalence
partitioning is done as it used to decrease the numeral test cases that must to be developed.
Equivalence partitioning helps in distributing the input domain of a black box testing and testing
overview techniques. Every equivalence classes, the group of data are treated the same through
the module under test and it produces the same result (dzone.com, 2017).
Document Page
Decision table testing
The decision table represents the possible input values and conditions (Sharma, 2017). The
actions or the events are generated, depending upon the makeup of the input conditions. Every
columns in the decision table is a single combination of the input conditions. It is called the
rules. The result are generated based on the action which is related with the rules. Each column
in the decision table developed a test case (SugunaMallika, 2013).
Acceptance testing
This testing is conducted to define whether or not a system fulfils its acceptance criteria
(Methodsandtools.com, 2017). To allow the consumer to determine whether or not to receive the
system (Ibm.com, 2017).
Boundary value testing
The boundary value is defined as a data value that matches to a maximum or minimum input
values and result value identified for a component or system.
Faults on the boundaries of the input domain and equivalence classes are more general. So,
emphasis testing is done at these boundaries. This kind of testing is called BVA (Boundary
Value Analysis) and guides to generate the test cases at edge of the equivalence classes. So, the
boundary value testing is done (Softwaretestinghelp.com, 2017).
6. Test case
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Check if options for Bool, ticket No, barcode.
Check whether is true or
Check whether it is false
Check if true, execute the program
Check if false, debug the error.
Check if options for answer have characteristic matching value.
Check if return method
Check if code has good structure
Check if braces are closed or not
Check if option for notify for Criteria
Document Page
Check if options for weight have characteristic MustMatch value
Check if options for weight have characteristic VeryImportant value
Check if options for weight have characteristic Important value
Check if options for weight have characteristic WouldPrefer value
Check if options for weight have characteristic DontCare value
Document Page
Check if option for BooleanQuestion have id, value
7. Test documentation
The below screenshot display the bug occurred code. The test cases are generated
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Document Page
chevron_up_icon
1 out of 17
circle_padding
hide_on_mobile
zoom_out_icon