1 / 32

CEN 4072 Software Testing

CEN 4072 Software Testing. PPT1: How failures come to be. PPT and video are due: no later than September 6, 5:00 PM Submit to: lpiegl@gmail.com This template file is just an outline of the presentation that you need to complete. Additional pages will

anglin
Télécharger la présentation

CEN 4072 Software Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CEN 4072 Software Testing PPT1: How failures come to be PPT and video are due: no later than September 6, 5:00 PM Submit to: lpiegl@gmail.com This template file is just an outline of the presentation that you need to complete. Additional pages will be necessary to fully explore the topic above. Each page should contain adequate text as well as illustrations. You are free to use all publicly available information (text as well as graphics) as long as the sources are properly acknowledged.

  2. Team members’ contributions Member [name]: Member [name]: Member [name]: Member [name]:

  3. Golden rules Content outline: • Software testing begins with careful design • Explanation and examples

  4. Golden rules Content outline: • Software that cannot be tested is useless • Explanation and examples

  5. Facts on debugging Content outline: • Examples of software failures • Impacts of software failures

  6. Facts on debugging Content outline: • Damages caused by software failures • Impacts on society

  7. Facts on debugging Content outline: • Facts on debugging • Costs, validation and improvements

  8. The TRAFFIC principle Content outline: • Track • Reproduce • Automate • Find origins • Focus • Isolate • Correct

  9. From defect to failure Content outline: • A sequence of events causing the defect to become a failure • Explanation and illustration

  10. Efficiency of testing Content outline: • How defects and failures are related? • Can testing show the absence of errors?

  11. Efficiency of testing Content outline: • How infections and defects are related? • Explanation and illustration

  12. Search in time and space Content outline: • Search from defect to failure in time and space • Illustration and explanation

  13. Search in time and space Content outline: • Find transition from sane to infected • Illustration and explanation

  14. Search in time and space Content outline: • Search from defect to failure: the principles • Examples of the complexity (number of variables and references among them)

  15. Sample program - main int main(int argc, char *argv[]) { int *a; int i; a = (int *)malloc((argc - 1) * sizeof(int)); for (i = 0; i < argc - 1; i++) a[i] = atoi(argv[i + 1]); shell_sort(a, argc); printf("Output: "); for (i = 0; i < argc - 1; i++) printf("%d ", a[i]); printf("\n"); free(a); return 0; }

  16. Sample program - sort static void shell_sort(int a[], int size) { int i, j; int h = 1; do { h = h * 3 + 1; } while (h <= size); do { h /= 3; for (i = h; i < size; i++) { int v = a[i]; for (j = i; j >= h && a[j - h] > v; j -= h) a[j] = a[j - h]; if (i != j) a[j] = v; } } while (h != 1); } There is a bug somewhere (main or shellsort). Find it using the principles below.

  17. Find origins Content outline: • Deduce value origins • Separate relevant from irrelevant

  18. Search in time Content outline: • Observe a transition from sane to infected • Example

  19. Observing a run Content outline: • Trace the execution for all variables for all steps of execution • Illustration in time and space

  20. Specific observations Content outline: • Observe the state at specific locations • Walk-through example

  21. Specific observations Content outline: • Find the transition from sane to infected • Example steps

  22. Specific observations Content outline: • Fix the defect • Regress or not to regress?

  23. Finding causes Content outline: • Find the difference between infected and sane states • Search in time and space

  24. Automated debugging: program slices Content outline: • Separate the part of the program that is relevant to the failure • Explanation and illustration

  25. Automated debugging: observing state Content outline: • Stop the program to observe the entire state • Is this an option for large programs?

  26. Automated debugging: watching state Content outline: • Watch a part of the state to find changes during execution • Examples and usefulness

  27. Automated debugging: assertions Content outline: • Specify expected values and check for them • Do we really know the expected values?

  28. Automated debugging: anomalies Content outline: • What is an anomaly? • Examples

  29. Automated debugging: anomalies Content outline: • Observe the difference between passing the failing runs • Would this help with anomalies?

  30. Automated debugging: cause-effect chains Content outline: • How many chains are there? • Is it reasonable to find THE cause-effect chain?

  31. Automated debugging: cause-effect chains Content outline: • Identify which variable caused the failure • Note: causes are not necessarily errors!

  32. Automated debugging: simplified input Content outline: • Simplify the input so that each part contributes to the failure

More Related