CodeAssurance`
CodeAssurance`

TestSummaryObject

TestSummaryObject[]

gives an object that represents the results of TestSummary.

Details and Options

  • A TestSummaryObject is typically obtained as a result from TestSummary.
  • TestSummaryObject[]["prop"] returns the value of "prop" for a given TestSummaryObject.
  • TestSummaryObject[][{"prop1","prop2", }] returns an association of values corresponding to several properties.
  • TestSummaryObject[]["Properties"] returns a list of all properties available.
  • Possible properties for TestSummaryObject include:
  • "Name"name of the summary
    "AllTestsSucceeded"whether all tests ran without any failures or aborts
    "TestsCount"number of tests run
    "TestsSucceededCount"number of tests that succeeded
    "SuccessRate"percent of tests that succeeded
    "TestsFailedCount"number of tests that failed
    "TestsFailedWrongResultsCount"number of tests that failed with wrong results
    "TestsFailedWithMessagesCount"number of tests that failed by generating messages
    "TestsFailedWithErrorsCount"number of tests that failed due to errors
    "AbsoluteTimeUsed"total time running all tests in seconds
    "TimeElapsed"total time running all tests in human readable form
    "CPUTimeUsed"total CPU time used in running all the tests
    "MemoryUsed"total memory used in running all the tests
    "MeanTestSize"mean bytesize over all tests
    "SameInvocation"whether all the tests were run in the same invocation
    "AbsoluteTime"absolute time the summary was created in UTC time zone
    "Created"DateObject of creation time in $TimeZone
    "TimeCreated"TimeObject of time created in $TimeZone
    "UUID"a unique ID
  • In TestSummaryObject[][statisticproperty] combinations of statistic and property can be drawn from:
  • statisticMin, Max, Mean, StandardDeviation, Variance, Skewness, Kurtosis
    propertyTimeElapsed, CPUTimeUsed, MemoryUsed, TestSize
  • So, for example, TestSummaryObject[]["MeanTimeElapsed"] defines the property of the mean time elapsed over all tests in the summary; TestSummaryObject[]["MaxMemoryUsed"] defines the property of the maximum memory used by any test in the summary etc.
  • TestSummaryObject[]["StatisticalProperties"] returns a list of properties containing summary statistics.
  • TestSummaryObject[]["Statistics"] returns of list of statistics for statistical properties.

Examples

open allclose all

Basic Examples  (1)

Make a test summary from the tests associated with TestSummaryObject.

Print all properties in the summary

A subset of properties are statistical properties that are aggregated across summaries.

List the statistical properties.

Statistical properties come with the standard measures of basic descriptive statistics.

Show statistics for the property TestSize.

Properties & Relations  (1)

"TimeElapsed" and "AbsoluteTimeUsed" measure identical properties but with different output forms.

Tech Notes
  • Testing that Scales
  • Paclet Workflow
  • Using the Testing Framework