TestResultObject
TestResultObject[…]
gives an object that represents the results of a VerificationTest.
Details
- TestResultObject is typically obtained as a result from VerificationTest.
- TestResultObject[…]["prop"] returns the value of "prop" for a given TestResultObject.
- TestResultObject[…][{"prop1","prop2",…}] returns an association of values corresponding to several properties.
- TestResultObject[…]["Properties"] returns a list of all properties available.
- Possible properties for TestResultObject include:
-
"AbsoluteTime" absolute time the test was created, in UTC time zone "AbsoluteTimeUsed" absolute number of seconds in real time that have elapsed "ActualMessages" messages generated on evaluating input "ActualOutput" output generated on evaluating input "CPUTimeUsed" CPU time spent on evaluating input "Created" DateObject of creation time, in $TimeZone "ExpectedMessages" messages passed to the test "ExpectedOutput" evaluated expected output "Input" original test input "MemoryConstraint" original MemoryConstraint value "MemoryUsed" number of bytes used to store all data "Outcome" outcome on running the VerificationTest "SameTest" original SameTest function "TestFileName" absolute file name of the currently executing test file "TestID" unique identifier for the test "TestKey" automatic key that is unique for every test "TimeConstraint" original TimeConstraint value "VerificationTest" original VerificationTest expression
Examples
open allclose allBasic Examples (2)
Run a VerificationTest to get a TestResultObject:
Extract output generated on evaluation of input:
Extract the original input and run the test again by using ReleaseHold:
Scope (1)
Extract several properties at once:
Extract all properties and present results in a Dataset:
Applications (1)
Use the "VerificationTest" property to recreate the original test expression:
Use ReleaseHold to run it again:
Text
Wolfram Research (2014), TestResultObject, Wolfram Language function, https://reference.wolfram.com/language/ref/TestResultObject.html.
CMS
Wolfram Language. 2014. "TestResultObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TestResultObject.html.
APA
Wolfram Language. (2014). TestResultObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TestResultObject.html