[go: up one dir, main page]

0% found this document useful (0 votes)
62 views27 pages

OOAD Software Quality and Testing

The document discusses quality assurance and testing strategies for object-oriented analysis and design. It covers topics like quality assurance testing, debugging errors, testing strategies including unit testing, integration testing, validation testing and system testing. It also discusses the impact of object orientation on testing and provides an example of test cases for a login functionality test scenario.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views27 pages

OOAD Software Quality and Testing

The document discusses quality assurance and testing strategies for object-oriented analysis and design. It covers topics like quality assurance testing, debugging errors, testing strategies including unit testing, integration testing, validation testing and system testing. It also discusses the impact of object orientation on testing and provides an example of test cases for a login functionality test scenario.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

OBJECT ORIENTED ANALYSIS AND

DESIGN
Subject code :
21CIC42 Module -5

QUALITY AND TESTING

1
MODULE 5 : QUALITY AND TESTING
Topics:
 Quality assurance
 Testing strategies
 Test cases
 Automated Testing Tools
 Case Study
 Cryptanalysis
 Health Care Systems
 Inventory Control System
 Rational Rose Suite.
OBJECT ORIENTED ANALYSIS AND DESIGN

Subject code : 21CIC42

MODULE 5: QUALITY AND TESTING


QUALITY AND TESTING
• Quality Assurance Tests: -
 Debugging is a process of finding out where something
went wrong and correcting the code to eliminate the errors
or bugs that cause unexpected results.
 A software debugging system can provide tools for finding
errors in programs and correcting them. Kinds of errors: In
general, a software has three types of errors such as below
1. Language (syntax) errors are result of incorrectly constructed
code, such as an incorrectly typed keyword or punctuations.
They are easiest error to be detected on simple running system
2. Run–time errors are detected on running, when a statement
attempts an operation that is impossible to carry out. Eg.: if
program tries to access a non-exist file or object, it occurs
3. Logic errors occur when expected output is not formed. They
can detected only by testing the code and analyzing the results
performed by intended codes 2
The elimination of syntactical bug is the process of debugging, whereas
detection and elimination of logical bug is the process of testing. Quality
assurance testing can be divided into two major categories: error–based testing
and scenario–based testing.

 Error–based testing techniques search a given class’s method for particular


clues of interests, then describe how these clues should be tested. E.g:
Boundary condition testing
 Scenario–based testing also called usage–based testing, concentrates on
capturing use –cases. Then it traces user’s task, performing them with their
variants as tests. It can identify interaction bugs. These are more complex
tests tend to exercise multiple subsystems in a single test covering higher
visibility system interaction bugs
 S/w testing is one element of a broader topic that is often referred to as
verification and validation (V&V). Verification refers to set of activities that
ensure that software correctly implements a specific function. Validation
refers to different set of activities that ensure that s/w that hs been built is
traceable to customer requirements

5
Testing Strategies
The objective of s/w testing is to uncover errors. The
various testing strategies constitutes –
• Unit Testing – Black Box testing, White black testing
• Integration Testing – Top–down testing, Bottom–up
testing, Regression testing
• Validation Testing – Alpha test, Beta test and
• System Testing – Recovery testing, Security testing,
Stress testing, Performance testing

6
• Unit and integration tests concentrate on functional
verification of a module and incorporation of modules into a
program structure.
• Validation testing demonstrates traceability to s/w
requirements and system testing validates s/w once it has been
incorporated into a larger system
• Unit test focuses verification effort on smallest unit of s/w
design the module. It constitutes two inner types of testing –
White box testing and Black box testing

• Black box testing: The concept of black box is used to


represent a system that’s inside working are not available for
inspection. In black box testing, we try various inputs and
examine resulting output though which we learn what the box
does nor how conversion takes place

7
• White box testing: White box testing assumes that specific
logic important and must be tested to guarantee system’s proper
functioning. One form of white box testing called path testing,
makes certain that each path in a object’s method is executed at
least once during testing & is of types
1. Statement testing coverage: Its aim is to test every statement
in object’s method at least once
2.Branch testing coverage: Idea is to perform enough tests
ensuring all branches are perfect

• Integration Testing: It is a systematic technique for


constructing the program structure while conducting tests to
uncover errors associated with interfacing. The object is to take
unit tested modules and build a program structure that has been
dictated by design. It has again 3 testing patterns: Top–down
testing, Bottom – up testing and regression testing
8
• Top–down testing: It assumes that main logic or object interactions
and system messages of application need more testing than an
individual object’s method or supporting logic. This strategy can
detect serious flaws early in implementation
• Bottom–Up testing: It starts with details of system and proceeds to
higher levels by a progressive aggregation of details until they
collectively fit requirements for system i.e., start with methods and
classes then to level up. It makes sense as it checks behavior of piece
of code before it is used
• Regression testing: It is activity that helps ensure that changes (due
to testing or other reasons) do not introduce unintended behavior or
additional errors. The regression test suite contain three different
classes of test cases:
⇒ A representative sample of tests that will exercise all s/w functions
⇒ Additional tests that focus on s/w functions that are likely to be
affected by change
⇒ Tests that focus on s/w components that have been changed
7
• Validation Testing: After integration testing, s/w is completely
assembled as a package: interfacing errors have been uncovered and
corrected and final series of s/w tests – validating testing – begins. It
is nothing but continuous execution on s/w by number of times &
users. It is again implemented either by one of two methods: Alpha
testing or Beta testing
 Alpha test is conducted in controlled environment at developer’s site
by a customer. The s/w is used in setting with developer “looking over
shoulder” of user, recording errors & usage problems
 Beta test is conducted at one or more customer sites by end user(s) of
the s/w. Its live application of s/w where customer records all problems
that are encountered during beta testing and reports
• System Testing: It is a series of different tests whose primary purpose
is to fully exercise the computer – based system. Although each test
has a different purpose, all work to verify that all system elements
have been properly integrated and perform allocated functions. The
different tests in series are Recovery, security, stress and performance
testing
10
• Recovery testing is a system test that forces s/w to fail in a variety of
ways and verifies that recovery is properly performed. If recovery is
automatic, re – initialization, checkpoint mechanisms, data recovery and
restart are each evaluated for correctness
• Security testing attempts to verify that protection mechanisms built into
a system will in fact protect it from improper penetration. During this
test, tester plays the role(s) of individual who desires to penetrate system.
The role of system designer is to make penetration cost greater than value
of information that will be obtained
• Stress testing executes a system in a manner that demands resources in
abnormal quantity, frequency or volume. A variation of stress testing is a
technique called sensitivity testing. In some situations, a very small range
of data contained within the bunds of valid data for a programs may
cause extreme and even erroneous processing or profound performance
degradation
• Performance testing is designed to test run –time performance of s/w
within context of an integrated system. It occurs throughout all steps in
testing process. Performance tests are often coupled with stress testing
and often require both h/w and s/w instrumentation
11
Object orientation on Testing
• The impact of an object orientation on testing can be
summarized as follows:
1.Some types of errors could become less plausible (not worth
for testing)
2.Some types of errors could become more plausible (worth
testing for now)
3. Some new types of errors might appear
• Impact of Inheritance in Testing: If designers do not follow
OOD guidelines especially, if test is done incrementally, it will
lead with objects that are extremely hard to debug and maintain
• Reusability of Tests: Marick argues that simpler is a test, more
likely it is to be reusable in sub classes. The models developed
for analysis & design should be used for testing as well

12
Test Cases
⇒ Testing is process of executing a program with the intent of finding errors
⇒ A good test case is one that has a high probability of detecting an as–yet
undiscovered error
⇒ A successful test case is one that detects as –yet undiscovered error
EXAMPLE
• For a Test Scenario: Check Login Functionality there many possible test
cases are:
Test Case 1: Check results on entering valid User Id & Password
Test Case Test Case
Test Steps Test Data Expected Actual Results Pass/Fail
ID Description
Results

1. Go to
site https://web.
Check whatsapp.com/ Userid =
2. Enter UserId User should
TU01 Customer guru99 As Expected Pass
3. Enter Login into
Login with Password =
Password an
valid Data pass99
4. Click Submit application

13
Automated Testing
Automated Testing is a technique where the Tester writes Scripts
on their own and uses suitable Software or Automation Tool to
test the software. It is an Automation Process of a Manual
Process. Allows for executing repetitive tasks without the
intervention of Manual Tester.

Reasons for Transformation:


 Quality Assurance
 Error or Bug-free Software
 Safety Assurance
 Multiple OS Support

14
Automated Testing Process

15
Automation Testing Process:
Test Tool Selection: There will be some criteria for the Selection of the tool.
The majority of the criteria include: Do we have skilled resources to allocate
for automation tasks, Budget constraints, and Do the tool satisfy our needs?
Define Scope of Automation: This includes a few basic points such as
Framework should support Automation Scripts, Less Maintenance must be
there, High Return on Investment, Not many complex Test Cases
Planning, Design, and Development: For this, we need to Install particular
frameworks or libraries, and start designing and developing the test cases such
as NUnit, JUnit, QUnit, or required Software Automation Tools
Test Execution: Final Execution of test cases will take place in this phase and
it depends on Language to Language for .NET, we’ll be using NUnit, for
Java, we’ll be using JUnit, for JavaScript, we’ll be using QUnit or Jasmine,
etc.
Maintenance: Creation of Reports generated after Tests and that should be
documented so as to refer to that in future for next iterations

16
Advantages of Automation Testing:
 Simplifies Test Case Execution
 Improves Reliability of Tests
 Increases amount of test coverage
 Minimizing Human Interaction
 Saves Time and Money
 Test Results are made public

Disadvantages of Automation Testing:


 It requires a lot of effort for selecting the tool and designing customized
software.
 There is always a human factor, i.e., it can’t test everything like
humans(design, usability, etc.).
 Tools might generate unexpected errors.
 Not every method or every process may be automated.

17
Automation Testing Tools

Selenium Installation
1) Jdk
https://www.oracle.com/in/java/technologies/javase-downloads.html
2) Eclipse installation
https://www.eclipse.org/downloads/
3)Selenium
https://www.selenium.dev/downloads/
4)Chrome driver installation
https://chromedriver.chromium.org/downloads 16
Cryptanalysis

 Security and cryptography can be important considerations in software


design, and there may be situations where cryptanalysis or other security-
related techniques are used as part of the design process.

 For example, in systems that involve the storage or transmission of sensitive


information, it may be necessary to use encryption and other cryptographic
techniques to protect the confidentiality and integrity of the data.

 In such cases, the design of the software system may need to take into
account the cryptographic algorithms and protocols that are being used, as
well as potential vulnerabilities or attacks that could be used to compromise
the security of the system.

19
Case-studies
HealthCare Domain Testing
Healthcare Domain Testing is a process to test healthcare application for various
factors like standards, safety, compliance, cross dependency with other entities, etc.
The purpose of healthcare domain testing is to ensure quality, reliability,
performance, safety and efficiency of the Healthcare application.

Refer:
https://www.guru99.com/healthcare-application-testing-with-
sample-test-cases.html
20
Rational Rose Suite

21
When to Use Rational Rose

22
Rational Rose Interface

23
24
25
Module Summary

Module 5 QUALITY AND TESTING

In this module we discussed the following Topics..

 Quality assurance
 Testing strategies
 Test cases
 Automated Testing Tools
 Case Study
 Cryptanalysis
 Health Care Systems
 Inventory Control System
 Rational Rose Suite.
Thank you

You might also like