Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate a TestReportObject with dynamic progress
ResourceFunction["MonitoredTestReport"][{test1,test2,…}] gives a report of the results of the verification tests testi while displaying test progress. | |
ResourceFunction["MonitoredTestReport"]["file"] runs tests from a file, returning an analysis of the completed test run. |
| MemoryConstraint | Infinity | memory (in bytes) each test is allowed to use |
| SameTest | SameQ | function to compare actual and expected outputs |
| TimeConstraint | Infinity | time (in seconds) each test is allowed to use |
| "Title" | Automatic | sets the title of the TestReportObject |
View progress information while running a test report:
| In[1]:= | ![]() |

| Out[1]= |
Run tests from a notebook:
| In[2]:= |

| Out[2]= |
View properties of the TestReportObject:
| In[3]:= |
| Out[3]= | ![]() |
Get an Association of individual test results in the form of TestResultObject:
| In[4]:= |
| Out[4]= | ![]() |
Extract information on tests that failed and present in a formatted TabView:
| In[5]:= | ![]() |
| Out[5]= | ![]() |
Retrieve the ResourceFunction:
| In[6]:= |
| Out[6]= |
Retrieve the ResourceObject:
| In[7]:= |
| Out[7]= | ![]() |
Verification tests can also be wrapped in HoldComplete, which is useful for constructing lists of tests without evaluation:
| In[8]:= | ![]() |
| Out[8]= |
Pressing the stop button during testing will return a TestReportObject containing the tests that were completed so far:
| In[9]:= |
| Out[10]= |
Here's an API that we would like to test:
| In[11]:= |
| Out[11]= |
Here's a file containing (incorrect) tests for it:
| In[12]:= | ![]() |

Use the progress panel to quickly spot when something is wrong in order to stop early:
| In[13]:= |

| Out[13]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License