Test oracle: Difference between revisions

Content deleted Content added
punctuation goes before references, restored the previous wording order
Citation bot (talk | contribs)
m Add: url, hdl. | You can use this bot yourself. Report bugs here.| Activated by User:Nemo bis | via #UCB_webform
Line 3:
In [[computing]], [[software engineering]] and [[software testing]] a '''test oracle''', or just '''oracle''', is a mechanism for determining whether a test has passed or failed.<ref>Kaner, Cem; [http://www.testingeducation.org/k04/OracleExamples.htm ''A Course in Black Box Software Testing''], 2004</ref> The use of oracles involves comparing the output(s) of the system under test, for a given [[test case|test-case]] input, to the output(s) that the oracle determines that product should have. The term "test oracle" was first introduced in a paper by William E. Howden.<ref>{{cite journal |last1=Howden |first1=W.E. |date=July 1978 |title=Theoretical and Empirical Studies of Program Testing |journal=IEEE Transactions on Software Engineering |volume=4 |issue=4 |pages=293–298 |doi=10.1109/TSE.1978.231514 }}</ref> Additional work on different kinds of oracles was explored by [[Elaine Weyuker]].<ref>Weyuker, Elaine J.; "The Oracle Assumption of Program Testing", in ''Proceedings of the 13th International Conference on System Sciences (ICSS), Honolulu, HI, January 1980'', pp. 44-49</ref>
 
Oracles often operate separately from the system under test.<ref name="038720881X">Jalote, Pankaj; ''An Integrated Approach to Software Engineering'', Springer/Birkhäuser, 2005, {{ISBN|0-387-20881-X}}</ref> However, [[Method (computer programming)|method]] postconditions are part of the system under test, as automated oracles in [[design by contract]] models.<ref>{{cite journal |last1=Meyer |first1=Bertrand |last2=Fiva |first2=Arno |last3=Ciupa |first3=Ilinca |last4=Leitner |first4=Andreas |last5=Wei |first5=Yi |last6=Stapf |first6=Emmanuel |date=September 2009 |title=Programs That Test Themselves |journal=Computer |volume=42 |issue=9 |pages=46–55 |doi= 10.1109/MC.2009.296 }}</ref> Determining the correct output for a given input (and a set of program/system states) is known as the '''oracle problem''' or '''test oracle problem'''<ref name="Oracle survey"/>{{rp|507}}, which is a much harder problem than it seems, and involves working with problems related to controllability and observability.<ref name="ammann-intro">Ammann, Paul; and Offutt, Jeff; "Introduction to Software Testing", ''Cambridge University Press'', 2008, {{ISBN|978-0-521-88038-1}}</ref> Various methods have been proposed to alleviate the test oracle problem. A popular technique is [[metamorphic testing]].<ref>{{cite journal | first1=Sergio | last1=Segura | first2=Gordon | last2=Fraser | first3=Ana B. | last3=Sanchez | first4=Antonio | last4=Ruiz-Cortes | title=A survey on metamorphic testing | journal=[[IEEE Transactions on Software Engineering]] | volume=42 | issue=9 | pages=805-824805–824 | date=2016 | doi=10.1109/TSE.2016.2532875| hdl=11441/38271 }}</ref><ref>{{cite journal | first1=Tsong Yueh | last1=Chen | first2=Fei-Ching | last2=Kuo | first3=Huai | last3=Liu | first4=Pak-Lok | last4=Poon | first5=Dave | last5=Towey | first6=T.H. | last6=Tse | first7= Zhi Quan | last7=Zhou | title=Metamorphic testing: A review of challenges and opportunities | journal=[[ACM Computing Surveys]] | volume=51 | issue=1 | pages=4:1–4:27 | date=2018 | doi=10.1145/3143561| url=http://eprints.nottingham.ac.uk/51607/1/__MTChallOpporCSUR.accepted.20170922.pdf }}</ref>
 
== Categories ==
Line 9:
 
=== Specified ===
These oracles are typically associated with formalised approaches to software modelling and software code construction. They are connected to [[formal specification]],<ref>{{cite book |last1=Börger |first1=E |editor-last1=Hutter |editor-first1=D |editor-last2=Stephan |editor-first2=W |editor-last3=Traverso |editor-first3=P |editor-last4=Ullman |editor-first4=M |date=1999|title=High Level System Design and Analysis Using Abstract State Machines |journal=Applied Formal Methods — FM-Trends 98 |volume=1641 |pages=1–43 |doi=10.1007/3-540-48257-1_1 |series=Lecture Notes in Computer Science |isbn=978-3-540-66462-8 |citeseerx=10.1.1.470.3653 }}</ref> [[model-based design]] which may be used to generate test oracles,<ref>{{cite journal |last1=Peters |first1=D.K. |date=March 1998 |title=Using test oracles generated from program documentation |journal=IEEE Transactions on Software Engineering |volume=24 |issue=3 |pages=161–173 |doi=10.1109/32.667877 |citeseerx=10.1.1.39.2890 }}</ref> state transition specification for which oracles can be derived to aid [[model-based testing]]<ref>{{cite journal| author-last1=Utting |author-first1=Mark |author-last2=Pretschner |author-first2=Alexander |author-last3=Legeard |author-first3=Bruno |title = A taxonomy of model-based testing approaches |journal = Software Testing, Verification and Reliability |volume= 22|issue= 5 |issn= 1099-1689|doi=10.1002/stvr.456 |pages= 297–312|year=2012 |url=https://eprints.qut.edu.au/57853/1/master_pdflatex.pdf }}</ref> and [[conformance testing|protocol conformance testing]],<ref>{{cite book|authorlink1=Marie-Claude Gaudel |last1=Gaudel |first1=Marie-Claude |editor-last1=Craeynest |editor-first1=D.|editor-last2=Strohmeier |editor-first2=A|date=2001 |title=Testing from Formal Specifications, a Generic Approach |journal= Reliable SoftwareTechnologies — Ada-Europe 2001 |volume=2043 |pages=35–48 |doi=10.1007/3-540-45136-6_3 |series=Lecture Notes in Computer Science |isbn=978-3-540-42123-8 }}</ref> and [[design by contract]] for which the equivalent test oracle is an [[assertion (software development)|assertion]].
 
Specified Test Oracles have a number of challenges. Formal specification relies on abstraction, which in turn may naturally have an element of imprecision as all models cannot capture all behaviour.<ref name="Oracle survey"/>{{rp|514}}