Download presentation
Presentation is loading. Please wait.
1
CSE 1020:Software Development
Mark Shtern
2
The Development Process
Requirements Design Implementation Testing Deployment
3
Interactive Development Process
Phase 1 Requirement Design Implementation Testing Evaluation Deployment if it is needed Phase 2 Phase N
4
Software Testing A formal proof Testing Manual
Automatic harness is a collection of software and test data configured to test a program unit by running it under varying conditions and monitoring its behaviour and outputs
5
Testing Is verification that every input that satisfied precondition leads to the postcondition Testing strategy: select a sample of all the possible valid inputs and verify correctness only for sample Each element of the sample is called test case The sample as a whole is called the test suite or the test vector
6
Test cases Input Loop Random File
7
Testing Black-box testing White-box testing
8
The Test Vector Domain Coverage selected from a set that covers the entire input domain Likely range Boundary cases Execution-Path Coverage include cases to ensure that every statement and every path in code will executed Regression Testing include cases to ensure functionality of the product
9
Debugging Error messages Internal assertions Debug messages
Using debuggers
10
Exersise 7.6 Perform a black-box testing on a method that takes two integer parameters and return a string. The method’s precondition states that two integers must be positive and less than 50. Select a test vector (a) (-5,5) (-1,0) (1, -5) (3,0) (b) (5,3) (3,5) (5,5) (3,3) (c) (1,3) (3,5) (10,49) (1,49) (49,1) (49,15) (d) (71,12) (50,5) (12,75) (51,7)
11
Exercise 7.7 (White box) final int MIN = 5; final int MAX = 10;
final int LIMIT = 5; if (x < MIN) output.println(“Left”); else if (x < MAX && y < LIMIT) output.println(“Middle”); else if (x < MAX) output.println (“Top”); else output.println(“Right”);
12
Exercises 7.12 Write an app that reads a double x from the user, ensures that it is in [0,1], or else terminates with error message, and then computes and outputs the following sum: x - x2/2 + x3/3 - x4/4 … The apps stop adding when the absolute value of the term is less than 10-3 Test cases 0 0.69
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.