Caselet Securing India’s Science Future
7.5 Construction Practice
7.5.3 Testing Principles
Pascal program helloworld (output);
begin
writeln('Hello World');
end.
Oracle PL/SQL CREATE OR REPLACE PROCEDURE helloworld AS BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World');
END;
Java class helloworld
{
public static void main (String args []) {
System.out.println ("Hello World");
} }
Perl # !/usr/local/bin/perl -w print "Hello World";
Basic print "Hello World"
7.5.3 Testing Principles
Whether you have performed testing for a number of years or have just started, this is a course you really need to take. You will be exposed to a number of testing practices; some of which will likely be new to you. Drawing on his over 30 years of experience with all aspects of the software process, Dr. Hanna will use real life examples to illustrate every point. The course will introduce you to a Scenario-Based test design methodology. The course also covers the different types of testing performed at each phase of the software lifecycle and the issues involved in these types of tests, clarifies testing terminology, and much more.
Principles of Good Testing
Complete testing isn’t possible: No matter how much you test, it is impossible to achieve total confidence. The only exhaustive test is one that leaves the tester exhausted!
Test work is creative and difficult: You must understand and probe what the system is supposed to do. You must understand and stress the limitations and constraints. You must understand the domain and application in depth.
Testing is risk-based: We can’t identify all risks of failure. Risk assessments indicate how much to test and what to focus on.
Notes
Analysis, planning, and design are important: Test objectives must be identified and understood. Tests must be planned and designed systematically. Without a road map, you will get lost.
Motivation is important: You cannot be effective if you don’t care about the job. You must want to find problems and enjoy trying to break the system.
Time and resources are important: You can’t be effective if you don’t have the time or resources to do the job.
Timing of test preparation matters a lot: Early test preparation leads to an understanding of project requirements and design. Early test preparation uncovers and prevents problems.
Early tests improve the effectiveness of subsequent reviews and inspections.
Measuring and tracking coverage is essential: You need to know what requirements, design, and code have and have not been covered. Complex software is too difficult to cover without systematic measurement.
Self Assessment
Fill in the blanks:
12. The main objective of testers is to design tests that uncover different classes of
………. with minimum amount of effort and time.
13. By contrast, higher level languages such as C, C++, Pascal, Cobol, Fortran, ADA and Java are called “………. languages”.
14. ………. indicate how much to test and what to focus on.
15. Complex software is too difficult to cover without ………. measurement.
7.6 Summary
Separation of concerns is recognition of the need for human beings to work within a limited context. The human mind is limited to dealing with approximately seven units of data at a time.
When specifying the behavior of a data structure component, there are often two concerns that need to be dealt with: basic functionality and support for data integrity.
A data structure component is often easier to use if these two concerns are divided as much as possible into separate sets of client functions.
The planning activity encompasses a set of management and technical practices that enable the software team to define a road maps it travels toward its strategic goal and tactical objectives.
The objective of this topic is to provide a starting point for the use of model-based verification techniques and a framework for their evaluation in real-world applications.
In software engineering practice, construction practice includes coding and testing tasks and principles. Testing is a process of finding out an error.
A good testing technique is one which gives the maximum probability of finding out an error.
Software Engineering
Notes
7.7 Keywords
MBSE: Model-Based Software Engineering SEMS: Software Engineering Maturity Spectrum
7.8 Review Questions
1. Separation of concerns is recognition of the need for human beings to work within a limited context. Explain.
2. The principle of abstraction is another specialization of the principle of separation of concerns. Comment.
3. Model-Based Software Engineering (MBSE) is the idea of achieving code reuse and perform maintenance. Analyze.
4. Analysis models represent customer requirements. Give Examples.
5. Explain why description of problem from end-user’s perspective is the start point of analysis modeling.
6. A good testing technique is one which gives the maximum probability of finding out an error. Analyze.
7. Coding principles helps you to maintain good coding practice along with concrete product development. Comment.
8. The advantage of exceptions is that they can be used without your code having to pass around error-code results from function to function. Examine.
9. The ‘principle of least surprise’ is that you should try to make your code’s actual functionality as close as possible to the typical quick impression. Discuss.
10. In object oriented programming, data are contained in objects and are accessed using special methods (blocks of code) specific to the type of object. Explain with reasons.
Answers: Self Assessment
1. client functions 2. run time
3. vertices 4. designing
5. consistency 6. panes
7. requirements 8. customer
9. information 10. implementation
11. behavior 12. errors
13. compiled 14. Risk assessments
15. systematic
Notes
7.9 Further Readings
Books Rajib Mall, Fundamentals of Software Engineering, Second Edition, PHI.
Richard Fairpy, Software Engineering Concepts, Tata McGraw Hill, 1997.
R.S. Pressman, Software Engineering a Practioner’s Approach, 5th edition, Tata McGraw Hill Higher education.
Sommerville, Software Engineering, Sixth edition, Pearson Education.
Online links http://ksi.cpsc.ucalgary.ca/KAW/KAW96/herlea/FINAL.html http://en.wikipedia.org/wiki/Requirements_analysis
Software Engineering
Notes
Unit 8: Design Engineering
CONTENTS
Objectives Introduction
8.1 What is Software Design?
8.2 Design Process 8.3 Design Quality 8.4 Design Concepts
8.4.1 Modularity 8.5 Summary
8.6 Keywords 8.7 Review Questions 8.8 Further Readings
Objectives
After studying this unit, you will be able to:
Recognize the design process and design quality
Scan the various design concepts
Introduction
Software design is a process of problem solving and planning for a software solution. After the purpose and specifications of software are determined, software developers will design or employ designers to develop a plan for a solution. It includes low-level component and algorithm implementation issues as well as the architectural view.