many facets of the test oracle problem
play

Many Facets of the Test Oracle Problem Prof. T.H. Tse The - PowerPoint PPT Presentation

Even the Very Wise Cannot See All Ends: Many Facets of the Test Oracle Problem Prof. T.H. Tse The University of Hong Kong Pokfulam, Hong Kong Formula for A Successful Keynote Speech { ? ! " " _ ^ -> :-) } 2 Formula for A


  1. Metamorphic Testing sin 0.9876 ? 0.8347 Expected Actual sin ( π – 0.9876) ? 0.8347 Expected Actual Expected metamorphic relation Actual relation sin 0.9876 = sin ( π – 0.9876) 0.8347 = 0.8347 52

  2. Real-Life Search Engine Example Apply Metamorphic Testing Metamorphic Real-Life Example Relation: Is 2.77M results More refined search correct? . should produce fewer number of entries. 53

  3. Refine to Real-Life Search Engine “children’s hospital of chicago” . More entries indicate failure in search engine .

  4. Real-Life Search Engine Example Is 4.54M results correct? .

  5. Refine to Real-Life Search Engine “children’s hospital of chicago” . More entries indicate failure in search engine .

  6. Real-Life Search Engine Example Human Issues  Microsoft Research selected our project for a Virtual Earth award  Google asked us to submit a bug report  Each of my brothers has 2 doctoral degrees  I have only one doctoral degree. 57

  7. Metamorphic Testing Other Real-World Applications  Services computing  Ubiquitous computing  Concurrent systems  Graphic applications  Numerical programs. 58

  8. Metamorphic Testing Recent Track Records Compilers  Based on metamorphic testing, an “equivalence modulo inputs” technique identified 147 unique faults in GCC and LLVM using one metamorphic relation 59

  9. Metamorphic Testing Recent Track Records Compilers  Based on metamorphic testing, an “equivalence modulo inputs” technique identified 147 unique faults in GCC and LLVM using one metamorphic relation Siemens Suite  Detected 3 new faults in Siemens suite after its long history of test case studies. 60

  10. Many Facets of the Test Oracle Problem Challenge 2:  Expected outcome = actual execution result 61

  11. Many Facets of the Test Oracle Problem Challenge 2:  Expected outcome = actual execution result  Consider the testing of real-life object-oriented software. 62

  12. Testing of Object-Oriented Software Our Real-Life Experience  Technology-transfer project for ASM, the world’s largest supplier of assembly and packaging equipment for the semiconductor industry. 63

  13. Testing of Object-Oriented Software Robotic arm after Home Home Expected Actual handling problem chip afresh afresh Simple concept Complex in specification implementation 64

  14. Many Facets of the Test Oracle Problem Challenge 2:  Expected outcome = actual execution result  Consider the testing of real-life object-oriented software Cannot define “=” at two different levels of abstraction . 65

  15. Testing of Object-Oriented Software Mimic Metamorphic Testing? Robotic arm after Home Home Expected Actual handling problem chip afresh afresh 66

  16. Testing of Object-Oriented Software Mimic Metamorphic Testing? Robotic arm after Home Home Expected Actual handling problem chip afresh afresh Robotic arm after handling standard chip 67

  17. Testing of Object-Oriented Software Mimic Metamorphic Testing? Robotic arm after Home Home Expected Actual handling problem chip afresh afresh Robotic arm after Home handling standard Expected afresh chip 68

  18. Testing of Object-Oriented Software Mimic Metamorphic Testing? Robotic arm after Home Home Expected Actual handling problem chip afresh afresh Robotic arm after Home Home handling standard Expected Actual afresh afresh chip 69

  19. Testing of Object-Oriented Software Mimic Metamorphic Testing? Robotic arm after Home Home Expected Actual handling problem chip afresh afresh Robotic arm after Home Home handling standard Expected Actual afresh afresh chip 70

  20. Testing of Object-Oriented Software Mimic Metamorphic Testing? Robotic arm after Home Home Expected Actual handling problem chip afresh afresh Robotic arm after Home Home handling standard Expected Actual afresh afresh chip 71

  21. Testing of Object-Oriented Software Mimic Metamorphic Testing? Robotic arm after Home Home Expected Actual handling problem chip afresh afresh Robotic arm after Home Home handling standard Expected Actual afresh afresh chip Expected relation Equivalent 72

  22. Testing of Object-Oriented Software Mimic Metamorphic Testing? Robotic arm after Home Home Expected Actual handling problem chip afresh afresh Robotic arm after Home Home handling standard Expected Actual afresh afresh chip Expected relation Equivalent 73

  23. Testing of Object-Oriented Software Mimic Metamorphic Testing? Robotic arm after Home Home Expected Actual handling problem chip afresh afresh Robotic arm after Home Home handling standard Expected Actual afresh afresh chip Actual relation Expected relation Equivalent Equivalent 74

  24. Target of OO Software Testing  An implementation P is correct with respect to the specification Sp if and only if  For any pair of equivalent sequences of operations in Sp , the actual objects resulting from P must be equivalent . 75

  25. Many Facets of the Test Oracle Problem Challenge 3:  Object A = object B What is object equivalence? 76

  26. What is Object Equivalence? Real-Life Word Processing Example

  27. What is Object Equivalence? Real-Life Word Processing Example

  28. What is Object Equivalence? Real-Life Word Processing Example Call this object O .

  29. What is Object Equivalence? Real-Life Word Processing Example Click “Hidden”.

  30. What is Object Equivalence? Real-Life Word Processing Example Call this object H .

  31. What is Object Equivalence? Output from Object H T.H. Tse is an Honorary Professor in Computer Science at The University of Hong Kong. He is a Steering Committee Chair of the IEEE International Conference on Software Quality, Reliability & Security. 82

  32. What is Object Equivalence? Real-Life Word Processing Example Take object O again.

  33. What is Object Equivalence? Real-Life Word Processing Example Delete.

  34. What is Object Equivalence? Real-Life Word Processing Example Call this object D .

  35. What is Object Equivalence? Output from Object D T.H. Tse is an Honorary Professor in Computer Science at The University of Hong Kong. He is a Steering Committee Chair of the IEEE International Conference on Software Quality, Reliability & Security. 86

  36. What is Object Equivalence? Attributive Equivalence ? H D =  Two objects will be attributively equivalent if they have the exactly the same visible attributes 87

  37. What is Object Equivalence? Attributive Equivalence T.H. Tse is an Honorary Professor in Computer H T.H. Tse is an Honorary Professor in Computer D Science at The University of Hong Kong. Science at The University of Hong Kong. = He is a Steering Committee Chair of the IEEE He is a Steering Committee Chair of the IEEE International Conference on Software Quality, International Conference on Software Quality, Reliability & Security. Reliability & Security.  Simple to test  But the definition is too weak to be useful ...  Why? . 88

  38. What is Object Equivalence? Real-Life Word Processing Example Take object H again (with hidden text).

  39. What is Object Equivalence? Real-Life Word Processing Example Click “ ¶ ”.

  40. What is Object Equivalence? Real-Life Word Processing Example Unclick “Hidden”.

  41. What is Object Equivalence? Real-Life Word Processing Example We get an object that behaves like the original object O .

  42. What is Object Equivalence? Real-Life Word Processing Example Take object D again (with deleted text).

  43. What is Object Equivalence? Real-Life Word Processing Example Click “ ¶ ”.

  44. What is Object Equivalence? Real-Life Word Processing Example We do not get an object that behaves like the original O .

  45. What is Object Equivalence? Observational Equivalence  Two objects will be observationally equivalent if they have the exactly the same visible attributes and behavior ≠ H D

  46. What is Object Equivalence? Observational Equivalence  Ideal criterion in object-oriented software testing  But very very very very very very very very very very very very very very very very very very very very very very very very very very very very very difficult to verify:  Need to check an infinite combination of possible behavior for every test case. 97

  47. UML State Machine Not Truly Suitable for OO Specification  Cannot distinguish between visible and hidden attributes and behavior  Cannot distinguish between attributive and observational equivalence ? = 98

  48. Algebraic Specification  A ground term is a sequence of operations  show(HKU QRS hide(TSE))  An axiom is a rule that specifies the refinement of a term  hide(D D’) = hide(D) hide(D’)  show(D D’) = show(D) show(D’)  show(hide(D)) = show(D)  show(W) = W . 99

  49. Algebraic Specification  A ground term may be transformed into another using axioms as left-to-right rewrite rules, until it reaches a normal form 100

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend