Presentation is loading. Please wait.

Presentation is loading. Please wait.

Testing L. Grewe Why test? Detect and eliminate errors in programDetect and eliminate errors in program Feedback to improve softwareFeedback to improve.

Similar presentations


Presentation on theme: "Testing L. Grewe Why test? Detect and eliminate errors in programDetect and eliminate errors in program Feedback to improve softwareFeedback to improve."— Presentation transcript:

1

2 Testing L. Grewe

3 Why test? Detect and eliminate errors in programDetect and eliminate errors in program Feedback to improve softwareFeedback to improve software Specification changes Specification changes Add new functionality Add new functionality

4 Testing Definitions Test case Test case Individual testIndividual test Test suite Test suite Collection of test casesCollection of test cases Test harness Test harness Program that executes a series of test casesProgram that executes a series of test cases Test framework Test framework Software that facilitates writing & running testsSoftware that facilitates writing & running tests Example – JUnitExample – JUnit

5 Types of Testing Acceptance Testing: Acceptance Testing: process of testing system in its real environment with real dataprocess of testing system in its real environment with real data Regression Testing: Regression Testing: re-execution of program tests after modifcations have been made...make sure still works properly.re-execution of program tests after modifcations have been made...make sure still works properly. Unit Testing: Unit Testing: Testing a module by itself.Testing a module by itself. Integration Testing: Integration Testing: tests groups of modules that have pased unit testing.tests groups of modules that have pased unit testing.

6 Testing Techniques Black-box testing – Black-box testing – testing program/module based on input values and expected output values.testing program/module based on input values and expected output values. Do not look at codeDo not look at code Clear (white) - box testing – Clear (white) - box testing – testing program/module based on executing each statement, branch/path of the code.testing program/module based on executing each statement, branch/path of the code. Allowed to examine codeAllowed to examine code Test Driver – Test Driver – a program that sets up the testing environment by declaring and assigning initial values to varialbes then calls the program/module to be tested. (i.e. sets up a test case).a program that sets up the testing environment by declaring and assigning initial values to varialbes then calls the program/module to be tested. (i.e. sets up a test case).

7 Unit Testing Test individual units extensively Test individual units extensively ClassesClasses MethodsMethods Used in “eXtreme Programming” (XP) Used in “eXtreme Programming” (XP) Extensive unit testing during developmentExtensive unit testing during development Pair programming (1 coder, 1 tester) Pair programming (1 coder, 1 tester) Design unit tests along with specificationDesign unit tests along with specification Approach Approach Test each method of classTest each method of class Test every possible flow path through methodTest every possible flow path through method

8 Unit Testing: Use of Flow Path Unique execution sequence through program Unique execution sequence through program Example ExampleS1 while (B1) { if (B2) S2elseS3} Flows S1 S1, S2 S1, S3 S1, S2, S2 S1, S2, S3 S1, S3, S2 S1, S3, S3 …

9 Unit Test – Flow Path Not possible to test all flow paths Not possible to test all flow paths Conditionals do not allowConditionals do not allow Infinite number of paths for loopsInfinite number of paths for loops New paths caused by exceptionsNew paths caused by exceptions

10 Integration Testing Test interaction between units Test interaction between units units may fail when combinedunits may fail when combined Proceed bottom up, in increasing size Proceed bottom up, in increasing size Example Example 1.Combinations: AB, AC, AD, CD, CE 2.Combinations: ACD 3.ABCDE (entire software) B A C D E Units/Modules showing connectivity

11 Acceptance Testing Test in user environment with Test in user environment with real data, users real data, users Typical operating conditions Typical operating conditions Tests performed/selected by users Tests performed/selected by users Terms: Alpha/Beta tests (stages of repeated release/testing) Terms: Alpha/Beta tests (stages of repeated release/testing)

12 Regression Test Have tests and expected results Have tests and expected results Rerun test suite after software changes Rerun test suite after software changes

13 For more…. We offer a course in software testing. We offer a course in software testing.


Download ppt "Testing L. Grewe Why test? Detect and eliminate errors in programDetect and eliminate errors in program Feedback to improve softwareFeedback to improve."

Similar presentations


Ads by Google