Oracolo (sviluppo software)

meccanismo usato nell'ingegneria del software per determinare se un test ha avuto successo o è fallito
(Reindirizzamento da Oracolo (software testing))

Un oracolo è un meccanismo usato nel collaudo del software e nell'ingegneria del software per determinare se un test ha avuto successo o è fallito.[1] Viene utilizzato confrontando l'output di un sistema sotto analisi, dato in ingresso uno specifico caso di test, con il risultato che il prodotto dovrebbe fornire (determinato dall'oracolo). Il termine è stato coniato ed usato per la prima volta in Introduction to the Theory of Testing di Howden.[2] Lavori addizionali su diversi tipi di oracoli sono stati studiati da Weyuker.[3] Gli oracoli sono solitamente separati dai sistemi oggetto di collaudo.[4] Le postcondizioni di un metodo vengono solitamente utilizzate come oracoli automatici nell'ambito dei test automatici di classi.[5]

Gli oracoli più comuni includono:

  • specifiche e documentazione,[6][7]
  • altri prodotti (ad esempio, un oracolo per un programma software potrebbe essere un programma che usa un algoritmo differente per valutare la stessa espressione matematica oggetto di collaudo),
  • un oracolo euristico che fornisce risultati esatti o approssimati per un determinato insieme di dati di collaudo in ingresso,[8]
  • un oracolo statistico che utilizza caratteristiche statistiche,[9]
  • un oracolo consistente che confronta i risultati dell'esecuzione di un test con quelli di un altro simile,[10]
  • un oracolo basato sui modelli che utilizza modelli simili per generare e verificare il comportamento di un sistema[11]
  • o il giudizio di un essere umano (ad esempio, il programma sembra fornire il corretto risultato?).[4]

Note modifica

  1. ^ Kaner, Cem; A Course in Black Box Software Testing Archiviato il 7 agosto 2020 in Internet Archive., 2004
  2. ^ Miller, Edward; and Howden, William E.; Software Testing and Validation Techniques, Long Beach, CA: IEEE Computer Society Press, 1978 (first edition), pp. 16-19
  3. ^ Weyuker, Elaine J.; "The Oracle Assumption of Program Testing", inProceedings of the 13th International Conference on System Sciences (ICSS), Honolulu, HI, January 1980, pp. 44-49
  4. ^ a b Jalote, Pankaj;An Integrated Approach to Software Engineering, Springer/Birkhäuser, 2005, ISBN 0-387-20881-X
  5. ^ Meyer, Bertrand; et al.; "Programs that Test Themselves", IEEE Computer, 42:9 (September 2009), pp. 46-55
  6. ^ Dennis K. Peters, Generating a Test Oracle from Program Documentation, su citeseerx.ist.psu.edu, McMaster University, 1995.
  7. ^ Dennis K. Peters e David L. Parnas, Generating a Test Oracle from Program Documentation (PDF), in Proceedings of the 1994 International Symposium on Software Testing and Analysis, ISSTA, ACM Press, pp. 58–65.
  8. ^ Hoffman, Douglas;Heuristic Test Oracles Archiviato il 14 marzo 2016 in Internet Archive., Software Testing & Quality Engineering Magazine, 1999
  9. ^ Mayer, Johannes; and Guderlei, Ralph;Test Oracles Using Statistical Methods
  10. ^ Hoffman, Douglas;Analysis of a Taxonomy for Test Oracles Archiviato il 10 marzo 2012 in Internet Archive., Quality Week, 1998
  11. ^ Robinson, Harry;Finite State Model-Based Testing on a Shoestring, STAR West 1999

Bibliografia modifica

  • Robert V. Binder, (1999). "Chapter 18 - Oracles" in Testing Object-Oriented Systems: Models, Patterns, and Tools, Addison-Wesley Professional, 7 November 1999, ISBN 978-0-201-80938-1