You are asked to submit an validation testing procedure and results. What do you do?
Validation testing procedure and results. Should be such that another person could perform the testing without guess work. Do not include instructions on how to compile and run the program. Rather provide various data inputs to test and the expected outputs!
You will learn that programs are comprised of various units. In the grand scale the program itself is considered a unit. However in Java programs are divided into classes and methods. Each class and each method in a Java program has potentially data in and data out. The IPO should identify this data and their range values.
To test if the IPO was correctly programed you need a testing plan to validate the program.
Data Analysis
This plan should include sample expected input values and sample expected output values based on the input values. You need to determine these manually outside the program. This process is often called data analysis. The data analysis step evaluates the data inputs and outputs and their relationships.
Desk checking: You also may hear of the term desk checking. The idea is you are checking data inputs, processing and outputs outside the program on your desk and not with the program. You can use a tool like Excel however.
You want to have a solid understanding of the data before you program.
Practicality
You cannot test every value possible for instance if an input was from 0.01 to 1000.00 you would not check very number .01, .02, .03, ... 999.98, 999.99, 1000.00.
However you can check the beginning value, ending value and perhaps a middle value or values most likely to be input. So if you tested -.01, 0.0, 0.01, 235.99, 999.99, 1000.00, and 1000.01 you would more than enough cover the data to test practically.
Keep in mind the subjective and objective nature of data analysis so you need to use good judgement.
Designing the Tests
You need to take the data you developed from desk checking and create a series of tests to run on the program using the expected inputs and expected outputs developed in the desk checking phase. Again some good judgement is needed.
Example
This example only has one input and one output to convert fahrenheit temperatures to celisus.
IPO:
Inputs: Fahrenheit -32.00 to 150.00
Scale adjustment = -32
RatioFtoC = 5 / 9
Processing: Celisus = (Fahrenheit - Scale adjustment ) * RatioFtoC
(Fahrenheit - 32) * 5 / 9
Outputs: Celisus -35.55556 to 65.55556
Desk Checking Analysis:
Fahrenheit Celisus
--------- ------------------------------
-32.01 Program error message appears
-32.00 -35.55556
-31.99 -35.55
-31.50 -35.27778
-10.00 -23.33333
32.00 0.00
0.0 -17.77778
90.00 32.22222
149.99 65.55
150.00 65.55556
150.01 Program error message appears
Using some judgement here are some reasonable tests to run. Notice that there were constant inputs, Sale Adjustment and RatioFtoC, in this example so the expected values are aways the same.
Test 1:
Values outside the expected input ranges:
Fahrenheit Celisus
--------- ------------------------------
-32.01 Program error message appears
150.01 Program error message appears
Test 2:
Values at expected range limits
Fahrenheit Celisus
--------- ------------------------------
-32.00 -35.55556
150.00 65.55556
Test 3:
Values expected a 0 input an 0 output
Fahrenheit Celisus
--------- ------------------------------
Test 4:
Values for good luck
Fahrenheit Celisus
--------- ------------------------------
32.00 0.00
90.00 32.22222
Performing the Tests
Each time you modify the program from a previous released version you need to perform all the tests. You may even perform the tests as you work on the program so you are checking the coding as you go to avoid a larger problem later.
Modifying the Tests
When the IPO changes, data analysis is revisited, and the tests may need changing. During testing, you may find that the tests need some modification because you are discovering results that need to be covered in testing.
Automating the Tests
To avoid human error in running tests, often they are automated. This means designing programs that provide the test input, evaluate the test ouputs and provide a report. Java lends itself to this process very nicely as classes can be developed to test the inputs and outputs of other classes.