0% found this document useful (0 votes)
5 views22 pages

Testing Technique - Syntax Testing

Uploaded by

Slum Dog
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views22 pages

Testing Technique - Syntax Testing

Uploaded by

Slum Dog
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Lecture 6

Testing Techniques
CSE435 – Software Quality Assurance
Instructor
Dr. Shamim H Ripon
CSE, EWU
Software
Quality
Assurance

Software Quality
Quality Assurance

Testing
Factors and Reachability
Metrics Inspection Technique
Models Analysis
s
What is Software Testing?
Several definitions:

1. “Testing is the process of establishing confidence that a program or


system does what it is supposed to.”
by Hetzel 1973

2. “Testing is the process of executing a program or system with the intent of


finding errors.”
by Myers 1979

3. “Testing is any activity aimed at evaluating an attribute or capability of a


program or system and determining that it meets its required results.”
by Hetzel 1983
Who does Software Testing
 Test manager
 manage and control a software test project
 supervise test engineers
 define and specify a test plan
 Software test engineers and testers
 define test cases, write test specifications, run tests
 Independent test group
 Development engineers
 Only perform unit tests and integration tests
 Quality assurance group and engineers
 Perform system testing
 Define software testing standards and quality control process
Testing

Apply Observe
input Softwar output
e

Oracle

Validate the observed output

Is the observed output the same as the expected


output?
Software Testing Limits
 Due to the testing time limit, it is impossible to achieve total
confidence

 We can never be sure the specifications are 100% correct

 We can never be certain that a testing system (or tool) is


correct

 No testing tools can cop with every software program

 Tester engineers never be sure that they completely


understand a software product
Software Testing Process
Unit Test (Component Level Test)
• What? Unit testing: Individual components are tested
independently to ensure their quality
• Why? The focus is to detect errors in design and
implementation, including:
• data structure in a component
• program logic and program structure in a component
• component interface
• functions and operations of a component
• Who? developers
interface
of the components
White-box Black-box
interface
input
Internal logic, data, structure input Operations and
Functions with I/O

output
output
operatio n
Integration Testing
What?
Integration test: A group of dependent components are composed and
tested together to ensure the quality of their integration unit
Why? The objective is to detect errors in:
- Design and construction of software architecture
- Integrated functions or operations at sub-system level
- Interfaces and interactions between them

Who? Either developers and/or test engineers


interface interface
Component #1 Component #2
input
Operations and Operations and
Functions with I/O Functions with I/O

output

operation operation
System Validation Testing
What?
System val. test: The entire integrated software that composes
the system is tested based on requirements to ensure that we
have the right product
Why ?
The objective is to detect errors in:
-System input/output
-System functions and information data
-System interfaces with external parts
-User interfaces
-System behavior and performance

Who? test engineers: SQA team


User System
interface
(Operations &
User Functions External interfaces
& Behavior)
Types of Testing
Lev
el
regressio
n
acceptanc
e system
integratio Accessibili
n unit
function ty
whit grey
al reliability e black box
robustness box
performance box
usability

Aspec
t
Levels of Testing

What users really Acceptance


need testing

Requiremen System
ts testing

Desig Integration
n testing

Cod Unit testing


e
System Testing
 Tests the overall system (the integrated hardware and
software) to determine whether the system meets its
requirements
 Focuses on the use and interaction of system functionalities
rather than details of implementations
 Should be carried out by a group independent of the code
developers
 Should be planned with the same rigor as other phases of the
software development
Regression Testing
Development versus maintenance
 Development costs: 1/3
 Maintenance costs: 2/3

Testing in maintenance phase


 How can we test modified or newly inserted programs?
 Ignore old test suites and make new ones from the scratch or
 Reuse old test suites and reduce the number of new test suites as many as possible
Testing Techniques
Functional testing (Black box testing):
1. Equivalence class analysis,
2. Cause effect graphs
3. Syntactic testing
4. Random testing
5. Transaction analysis
6. Testing based on models
7. Testing state transitions
Data Validation and Syntax
Testing
Generators and Recognizers
Syntax Testing
 What is Syntax Testing?
 A type of black box testing technique
 used to examine the format and the grammar of the data inputs used in the
software application, either external or input,
 The grammar may be formally described in technical or established & specified
notations such as BNF and could be used to design input validation tests.
 Syntax testing is performed to verify and validate the both
internal and external data input to the system, against the
specified format, file format, database schema, protocol and
other similar things.
 Generally, syntax tests are automated, as they involve the
production of large number of tests.
How to Perform Syntax Testing?
The methodology of syntax testing can be perceived and understood
through following steps :
 The very first step of the syntax testing involves the identification of the
target language or format.
 Thereafter, syntax of the language is defined. As each and every input has
some syntax, which may be formally pre-specified, undocumented, etc.
 The final step involves testing and debugging the syntax to ensure its
completeness & consistency. Generally, the syntax is tested using two
conditions as stated below.
 Testing the normal condition using the covering set of paths of the syntax graph, for the
minimum necessary requirements.
 Testing the garbage condition, using invalid set of input data.
Data Validation and Syntax Testing
 The goal is to determine data tests based on formal
description. The formal description is a BNF or an FSM.
 BKF – Bakus- Naur Form
 FSM – Finite State Machine
 The routine is a string recognizer
 The tester is string generator
 What to capture?
 2 possibilities
 The recognizer does not recognize a good string
 It accepts a bad string
Syntax Testing (contd.)

Recognizer for
copy aa to bb
rename aa to bb
copy a to b

First step: define the grammar


Syntax Testing (contd.)
Second step: build a corresponding derivation tree
Syntax Testing (contd.)
Third step: produce data test based on the
derivation tree
Cover valid commands, then invalid
commands

You might also like