Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
09 cs491 st-t1
1. PES Institute of Technology, Bangalore
(Autonomous Institute under VTU, Belgaum)
09CS491
CONTINUOUS INTERNAL EVALUATION (CIE) B. E. 8TH
SEMESTER – Mar. 2013
TEST -1
Software Testing
Time: 1½ Hrs Answer All Questions Max Marks: 50
1 a) Define Software Quality Assurance. What are its objectives? What are the various
activities included in SQA in a software project?
06
b) What is the model generically applied during software development phases to facilitate
verification & validation activities. Explain with a schematic diagram.
04
2 a) Consider the case of testing for an application which implements the following
functionality:
An elevator control system that sets the speed as follows: Normal speed of elevator is 5
m/s; It can take a load of 0-15 people. It can also move in fast mode of 8 m/s, if the number
of people is less than 10. If the difference between starting and stopping floor is > 3 then
again fast mode is used. During lift maintenance, it is set to express mode when the speed
is 12 m/s.
Write the equivalence partitions, boundary conditions and decision tables to help generate
test cases for the control system.
08
b) Differentiate between testing and debugging. Who does the debugging? 02
3 a) Differentiate between black box testing and white box testing. Provide explanation with
examples
10
4 a) Show the flow chart diagram for the code segment below and count the number of distinct
execution paths. Which are all the values of date that need to be input to execute all the
paths? ( state in dd-mm-yyyy format )
day = dayOf(givenDate); month = monthOf(givenDate); year = yearOf(givenDate);
if( month == 2 )
if( leapYear(year) ) isValidDate = day <=29;
else isValidDate = day <= 28;
else
if( month in [ 4, 6, 9, 11 ] isValidDate = day <= 30;
else isValidDate = day <= 31;
04
b) Which are the various types of dynamic/structural testing. Provide one line description for
each.
04
c) Mention any four program defects/issues that are caught by static analysis tools 02
5 a) Write briefly on any three types of testing which are based on what (target) is being tested. 06
2. b) What are the testing related activities one can do even before the actual program is
completed and ready?
04
Scheme & Solution
09 CS 491 – T1(Mar 2013)
1a) Define Software Quality Assurance. What are its objectives? What are the various activities
included in SQA in a software project?. *********06
[ 2marks each for defn, objectives and activities ]]
A systematic, planned set of actions necessary to provide adequate confidence that the software
development process or the maintenance process of a software system product conforms to
established functional, technical requirements as well as with the managerial requirements of
keeping the schedule and operating within the budgetary confines.
Objectives
Reduce number of defects
Assuring acceptable level of performance
Assuring confidence w.r.t to managerial scheduling & budgeting of software project
Trigger management actions for control and betterment of project
Have proactive measures to ensure development process is smooth
To facilitate software creation aligning with Quality Engineering
Included activities
Reviews, Planning, testing
Validation, verification
Defining and maintaining process and engineering measures and metrics.
Defect prevention, detection, correction
Quality objectives and quantitative certification
b)What is the model generically applied during software development phases to facilitate
verification & validation activities. Explain with a schematic diagram. ************04
[[ 2 marks for diagram; 2 marks for description ]]
ETVX model Diagram of below or the book diagram
Descriptions for
Entry Criteria –Define the inputs and the quality of it
Task Definition- Steps of what needs to be done
3. Validation definition – What are the check points inside the process
Exit criteria – What are the outputs and their quality
=================
2a) Consider the case of testing for an application which implements the following functionality:
An elevator control system that sets the speed as follows: Normal speed of elevator is 5 m/s; It can take a
load of 0-15 people. It can also move in fast mode of 8 m/s, if the number of people is less than 10. If the
difference between starting and stopping floor is > 3 then again fast mode is used. During lift
maintenance, it can also be set to express mode when the speed is 12 m/s.
Write the equivalence partitions, boundary conditions and decision table to help generate test cases for
the control system. ***08
[[ 3 + 2 + 3 marks
Param EVP Type Input Speed set
People <0 Invalide -1, tom Error
0-9 Valid 6 8
10-15 Valid 14 5
Floor Diff <=0 Invalid 0 Error
1-3 Valid 2 5 Or 8
>3 Valid 8 8
Mode Normal Valid Normal 5
Express Valid Express 12
Boundary based on Floor difference [ others similarly ]
param Objective Value Set speed
People Lower than min -range1 -3 Error
Just below min -1 Error
Min 0 8
In range 7 8
Just below min - range 2 9 8
Min – range2 10 5
.
Decision table
Mode Floor Diff # of people Set speed
Normal 1-3 1-9 8
Normal 1-3 10-15 5
Normal >3 X 8
Maintenance X X 12
]]
b) Differentiate between testing and debugging. Who does the debugging? ****02
[[
• Testing is the process of identifying the defects in the product in question.
4. • Debugging the process of identifying the location of defect in the product code/configuration.
Also, the root cause of the defects.
• Team member with development skills in the language and environment is needed to debug.
]]
=================
3a) Differentiate between blackbox testing and white box testing. Provide detailed explanation
with examples ****************10
[[
Below points need to be expanded appropriately with examples – 5 each
Black box
- Based on functionality / requirement;
- No knowledge of internal implementation
- No knowledge of environment
- No need to access the source code ; Only executables required
- No skill of development required
- Testing possible only when full functionality is implemented
- Done later than white box testing
- Has techniques such as EVP, boundary value, Decision tables…
- Execution environment is required
- Most part can be done by non-developers
White box
- Based on understanding of implementation platform
- Skill of implementation code , design, architecture and environment required
- Applies to small units and need not wait till entire build is done – done early
- Source code is required
- Static testing ( part of white box ) can be done without the environment
- Has techniques such as static testing, unit functionality, code coverage, complexity
- Most part done by developers
- In addition to functionality, quality of “construction” from maintenance, reliability is also seen
- Catches defects early and makes the process efficient.
- Along with errors, root cause is also seen. Helps to prevent defects in other parts of code.
- Has led to techniques such as pair programming
- Complexity testing would point to potential of error presence rather than error. Also indicator for
maintenance difficulty.
]]
=================
4a) Show the flow chart diagram for the code segment count the number of distinct execution paths.
Which are all the values of date that need to be input to execute all the paths? ( dd-mm-yyyy ) ** 04
day = dayOf(givenDate); month = monthOf(givenDate); year = yearOf(givenDate);
if( month == 2 )
if( leapYear(year) ) isValidDate = day <=29;
else isValidDate = day <= 28;
else
if( month in [ 4, 6, 9, 11 ] isValidDate = day <= 30;
else isValidDate = day <= 31;
5. [[
Ans – 4 paths ( or 8 if students expand the expression in each case! ) one example for each true / false – at
least 4
2 marks for diag and count + 2 marks for data
]]
4b)Which are various types of dynamic/structural testing. Provide one line description for each.
*04
[[ 1 + 2 + 1 marks
• Unit testing – Mainly to check functionality at unit level
• Code coverage
o Statement coverage
o Path coverage – All possible paths considering combination of conditions
o Condition coverage – Each condition in direct or multi-branch situation
o Function coverage – Each procedure to be covered in testing
• Code complexity – Cyclomatic complexity as defined by edges and paths between nodes.
]]
4c)Mention any four program defects/issues that are caught by static analysis tools 02
[[ 1 marks each for any 4 four of
Whether there are unreachable codes
Variables declared but not used
Mismatch in definition and assignment of values to variables
Illegal or error-prone type-casting of variables
Use of non-portable or architecture-dependent programming constructs
Memory allocated but not having corresponding statements for freeing up memory
For calculation of cyclomatic complexity
As an extension of compilers (lint, compiler flag driven checking…)
Coding standards adherence
◦ Variable naming, indentation, in-line documentation……
Best practice violations – Hard codings…
]]
====================
5a) Write briefly on any three types of testing based on What (target) is being tested.***06
[[
Unit Testing – Only part of the system is tested. Done by developer as soon as done; techniques
such as path testing, condition are done. Static testing done; Meaningful unit level
Integration testing – When Units are integrated to have combined functionality. Done
incrementally to ensure the things works after integration and interface errors are less
System Testing – When all the units are integrated. Environment set almost similar to end use
condition. Ensure realistic test data – preferably from real life. Also working in combination with
other applications
]]
5b) What are the testing related activities one can do even before the actual program is completed
and ready? **04
[[ Expand any 4 these.
Test Planning / strategy
6. Understand the system based on requirements
Test case development
Test data creation
Test environment setup
]]
7. Understand the system based on requirements
Test case development
Test data creation
Test environment setup
]]