Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
TestObject
  • See Also
    • TestCreate
    • TestReport
    • TestReportObject
    • $TestFileName
  • Related Guides
    • Systematic Testing & Verification
  • Tech Notes
    • Using Testing Notebooks
    • Using the Testing Framework
    • See Also
      • TestCreate
      • TestReport
      • TestReportObject
      • $TestFileName
    • Related Guides
      • Systematic Testing & Verification
    • Tech Notes
      • Using Testing Notebooks
      • Using the Testing Framework

TestObject[…]

gives an object that represents the results of a TestCreate.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Applications  
Properties & Relations  
Properties  
"AbsoluteTime"  
"AbsoluteTimeUsed"  
"ActualMessages"  
"ActualOutput"  
"CPUTimeUsed"  
"Created"  
"ExpectedMessages"  
"ExpectedOutput"  
"FailureType"  
"Input"  
"MemoryConstraint"  
"MemoryUsed"  
"MetaInformation"  
"Outcome"  
"SameTest"  
"TestFileName"  
"TestID"  
"TestKey"  
"TimeConstraint"  
"TestCreate"  
"VerificationTest"  
See Also
Tech Notes
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • TestCreate
    • TestReport
    • TestReportObject
    • $TestFileName
  • Related Guides
    • Systematic Testing & Verification
  • Tech Notes
    • Using Testing Notebooks
    • Using the Testing Framework
    • See Also
      • TestCreate
      • TestReport
      • TestReportObject
      • $TestFileName
    • Related Guides
      • Systematic Testing & Verification
    • Tech Notes
      • Using Testing Notebooks
      • Using the Testing Framework

TestObject

TestObject[…]

gives an object that represents the results of a TestCreate.

Details

  • TestObject is typically obtained as a result from TestCreate.
  • TestObject[…]["prop"] returns the value of "prop" for a given TestObject.
  • TestObject[…][{"prop1","prop2",…}] returns an association of values corresponding to several properties.
  • TestObject[…]["Properties"] returns a list of all properties available.
  • Possible properties for TestObject 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 TestCreate
    "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
    "TestCreate"original TestCreate expression
    "VerificationTest"original VerificationTest expression
  • Possible values of the "Outcome" property include:
  • "Success"the test passed successfully
    "MessageFailure"the test failed by emitting messages during the evaluation
    "Failure"the test did not pass successfully
    "NotEvaluated"the test was not evaluated
  • Possible values of the "FailureType" property include:
  • "SameTestFailure"actual output did not match expected output
    "SameMessagesFailure"unexpected messages were emitted
    "SameTestUnevaluated"the SameTest function did not return True or False
    "TimeConstraintFailure"the TimeConstraint option was exceeded
    "MemoryConstraintFailure"the MemoryConstraint option was exceeded
    "TimeConstraintInvalid"the TimeConstraint option was invalid
    "MemoryConstraintInvalid"the MemoryConstraint option was invalid
    "EvaluationAbortedFailure"evaluation was terminated by Abort
    "UncaughtThrowFailure"evaluation was terminated by Throw
    "IntermediateTestFailure"an IntermediateTest failed
    "IntermediateTestMessagesFailure"an IntermediateTest emitted unexpected messages

Examples

open all close all

Basic Examples  (2)

Run TestCreate to get a TestObject:

Use TestEvaluate to run the test:

Extract the original input:

Extract the original input and run the test again by using ReleaseHold:

Scope  (1)

List of all properties:

Extract several properties at once:

Extract all properties and present results in a Dataset:

Applications  (1)

Evaluate a test:

Use the "TestCreate" property to recreate the original test expression:

Use ReleaseHold to create a new one again:

Properties & Relations  (34)

Properties  (34)

"AbsoluteTime"  (1)

Create a test:

Use "AbsoluteTime" to extract the creation time of the test in UTC:

Use FromAbsoluteTime to convert the value in a DateObject:

Use the "Created" property to get a DateObject in your time zone:

"AbsoluteTimeUsed"  (1)

Run a test:

Use "AbsoluteTimeUsed" to extract the absolute number of seconds in real time that have elapsed:

The property returns a Missing if the TestObject was never evaluated:

"ActualMessages"  (1)

Run a test that emits messages:

Use "ActualMessages" to extract all messages emitted during the evaluation of the test:

The expression is wrapped in HoldForm:

The property returns a Missing if the TestObject was never evaluated:

"ActualOutput"  (1)

Run a test:

Use "ActualOutput" to extract the result of the input expression:

The expression is wrapped in HoldForm:

The property returns a Missing if the TestObject was never evaluated:

"CPUTimeUsed"  (1)

Run a test:

Use "CPUTimeUsed" to extract the CPU time spent on evaluating the input:

The property returns a Missing if the TestObject was never evaluated:

"Created"  (1)

Create a test:

Use "Created" to extract the creation date as a DateObject:

"ExpectedMessages"  (1)

Create a test:

Use "ExpectedMessages" to extract all messages expected during the evaluation of the input:

The expression is wrapped in HoldForm:

"ExpectedOutput"  (1)

Create a test:

Use "ExpectedOutput" to extract the expected result:

The expression is wrapped in HoldForm:

"FailureType"  (11)

Evaluate a test:

Use "FailureType" to extract the failure code for the test:

Create a test for which the SameTest function does not return True or False:

The failure type is "SameTestUnevaluated":

Create a test for which the TimeConstraint value will be exceeded:

The failure type is "TimeConstrainedFailure":

Create a test in which the TimeConstraint value is invalid:

The failure type is "TimeConstrainedInvalid":

Create a test in which the MemoryConstraint value is exceeded:

The failure type is "MemoryConstrainedFailure":

Create a test in which the MemoryConstraint value is invalid:

The failure type is "MemoryConstrainedInvalid":

Create a test where an Abort[] is encountered:

The failure type is "AbortFailure":

Create a test where a Throw[] is encountered:

The failure type is "UncaughtThrowFailure":

Create a test where an IntermediateTest fails:

The failure type is "IntermediateTestFailure":

Create a test where an IntermediateTest fails by emitting unexpected messages:

The failure type is "IntermediateTestMessagesFailure":

The failure type None is returned when a test succeeds:

"Input"  (1)

Create a test:

Use "Input" to extract the original input expression:

The expression is wrapped in HoldForm:

"MemoryConstraint"  (1)

Create a test that uses the MemoryConstraint option:

Use "MemoryConstraint" to extract the original value of the option:

"MemoryUsed"  (1)

Run a test:

Use "MemoryUsed" to extract the memory used during the evaluation of the input:

"MetaInformation"  (1)

Create a test:

Use "MetaInformation" to extract the memory used during the evaluation of the input:

"Outcome"  (1)

Run a test:

Use "Outcome" to extract the outcome of a test:

The test will give a "Failure" outcome if the "ActualOutput" does not match the "ExpectedOutput":

The test will give a "MessagesFailure" outcome if the test succeeds but does not emit the specified list of "ExpectedMessages":

The test will fail if the SameTest function does not return True:

"SameTest"  (1)

Create a test:

Use "SameTest" to extract the original value of the option:

"TestFileName"  (1)

Run a test suite from a file or notebook:

Extract the first TestObject:

Use "TestFileName" to extract the name of the test file:

"TestID"  (4)

Create a test:

Use "TestID" to extract the original value of the option:

A TestID can be any expression:

By default, the TestID is a Hash of the test:

The TestID will change if the input of the TestCreate expression is different:

Use CreateUUID to create random identifiers every time:

"TestKey"  (1)

Create a test:

Use "TestKey" to extract a globally unique identifier of the test run:

"TestKey" will change after the test evaluates:

"TimeConstraint"  (1)

Create a test:

Use "TimeConstraint" to extract the original value of the option:

"TestCreate"  (1)

Create a test:

Use "TestCreate" to create a TestCreate expression from the object:

The expression is wrapped in HoldForm:

"VerificationTest"  (1)

Create a test:

Use "VerificationTest" to create a VerificationTest expression from the object:

The expression is wrapped in HoldForm:

See Also

TestCreate  TestReport  TestReportObject  $TestFileName

Tech Notes

    ▪
  • Using Testing Notebooks
  • ▪
  • Using the Testing Framework

Related Guides

    ▪
  • Systematic Testing & Verification

History

Introduced in 2023 (13.3)

Wolfram Research (2023), TestObject, Wolfram Language function, https://reference.wolfram.com/language/ref/TestObject.html.

Text

Wolfram Research (2023), TestObject, Wolfram Language function, https://reference.wolfram.com/language/ref/TestObject.html.

CMS

Wolfram Language. 2023. "TestObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TestObject.html.

APA

Wolfram Language. (2023). TestObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TestObject.html

BibTeX

@misc{reference.wolfram_2025_testobject, author="Wolfram Research", title="{TestObject}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/TestObject.html}", note=[Accessed: 01-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_testobject, organization={Wolfram Research}, title={TestObject}, year={2023}, url={https://reference.wolfram.com/language/ref/TestObject.html}, note=[Accessed: 01-December-2025]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Player
  • Wolfram Engine

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English