RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.1, Nov 17, 2026

RunMat® is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

/
See all docs
Builtin Reference
    • functiontests
    • matlab.unittest.TestCase
    • matlab.unittest.TestRunner.addPlugin
    • matlab.unittest.TestRunner.run
    • matlab.unittest.TestRunner.withTextOutput
    • testsuite

testsuite — Discover MATLAB-style test procedures without running their bodies.

testsuite freezes selected source files, asks Core for semantic test discovery, and returns a scalar matlab.unittest.TestSuite-compatible object or a homogeneous object row. Discovery shares the same source and procedure identities as runtests and TestRunner.run; it does not execute test bodies.

Syntax

suite = testsuite
suite = testsuite(tests, Name, Value, ...)

Inputs

tests
Type
Any
Required
No
Default
current folder
Description
Test file, folder, function name, string array, or cell array of targets to discover without execution.
Name,Value
Type
Any
Required
Variadic
Default
—
Description
Common options such as IncludeSubfolders, BaseFolder, Name, ProcedureName, and UseParallel.
NameTypeRequiredDefaultDescription
testsAnyNocurrent folderTest file, folder, function name, string array, or cell array of targets to discover without execution.
Name,ValueAnyVariadic—Common options such as IncludeSubfolders, BaseFolder, Name, ProcedureName, and UseParallel.

Returns

suite
Type
Any
Description
Scalar TestSuite object or homogeneous TestSuite object row; no test procedure is executed.
NameTypeDescription
suiteAnyScalar TestSuite object or homogeneous TestSuite object row; no test procedure is executed.

Errors

RunMat:Testing:RequiresExecutor
When
`testsuite` is dispatched outside an active Core test executor.
Message
testsuite: requires an active Core test executor
RunMat:testsuite:InvalidInput
When
A target or option value has an unsupported type or value.
Message
testsuite: invalid input
RunMat:testsuite:UnsupportedOption
When
A documented option requires an execution mode not available through the in-program adapter.
Message
testsuite: unsupported option
IdentifierWhenMessage
RunMat:Testing:RequiresExecutor`testsuite` is dispatched outside an active Core test executor.testsuite: requires an active Core test executor
RunMat:testsuite:InvalidInputA target or option value has an unsupported type or value.testsuite: invalid input
RunMat:testsuite:UnsupportedOptionA documented option requires an execution mode not available through the in-program adapter.testsuite: unsupported option
RunMat:testsuite:TargetNotFoundA requested test target cannot be resolved to a file or folder.testsuite: test target not found
RunMat:testsuite:FileReadFailedA discovered test file cannot be read as source text.testsuite: failed to read test file
RunMat:Placement:InsufficientResourceEvidenceFinite host-memory policy cannot certify discovery, frozen source, and result storage before source effects.testsuite: discovery, source, and result storage has no certified finite resource bound
RunMat:testsuite:TooManyOutputsMore than one result output is requested.testsuite: at most one output is supported

Targets and selection

suite = testsuite discovers the current folder. testsuite(target, Name, Value, ...) accepts a test file, folder, bare function name, string array, or cell of scalar text. BaseFolder constrains relative explicit targets, or supplies discovery roots when no target is given.

Folder discovery recognizes .m stems beginning with test or ending with Test, case-insensitively. IncludeSubfolders=true recursively searches subfolders. Explicit test paths need not match that naming convention.

Core discovers script, function, functiontests(localfunctions), and class suites semantically. Name and ProcedureName are substring filters on semantic display names, not the full MATLAB selector model. Runtime does not scan function declarations or append calls to source.

The returned objects include Name and TestFile metadata and can be supplied to the existing TestRunner service. Discovery itself neither executes qualifications nor mutates the caller workspace.

Controls and limitations

Host string scalars, character rows, and text collections control discovery. Exact integer, double, and logical flags accept only scalar zero or one. Resident controls reject without a GPU gather or provider lookup.

UseParallel=false is accepted; true is unsupported by the in-program adapter. Nonempty Tag filters remain unsupported at this entry point. OutputDetail and LoggingLevel accept scalar text but do not alter discovery output. The RunMat Coverage flag is accepted by the shared parser but does not collect coverage during discovery.

An active Core test service is required. It is selected from the explicitly retained RuntimeContext; no unrelated active session or alternate executor is substituted. Core constructs its existing child session and freezes the exact once-read source bytes.

Directory discovery, frozen sources, semantic descriptors, and result objects have no certified physical allocation bound. A finite host-memory policy rejects before filesystem discovery or reads; this entry does not claim bounded-host completion.

Zero or one output is supported. Invalid controls, discovery failures, missing executor, or unsupported infrastructure are diagnostics; discovering an invalid test body is distinct from executing a failed test.

This adapter does not implement MATLAB wildcard selectors, direct file/procedure selectors, namespace/project selector semantics, or advanced parameter/dependency filters. BaseFolder supplies path-resolution roots here rather than MATLAB's wildcard base-folder filter. Unknown options fail instead of being silently accepted.

Examples

Discover a script without executing its body

suite = testsuite('testDiscovery.m');

Select a semantic test procedure by name

suite = testsuite('selectionTests.m', 'Name', 'testBeta');

Using testsuite with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how testsuite changes the result.

Run a small testsuite example, explain the result, then change one input and compare the output.

FAQ

Does testsuite run the test bodies?⌄

No. It returns semantic test procedure descriptors. Use runtests or a TestRunner to execute them.

Does discovery read and then regenerate source?⌄

No. Runtime reads each selected source once. Core freezes those original bytes and discovers semantic procedures without generated source calls.

Related Testing functions

Testing

functiontests · matlab.unittest.TestCase · matlab.unittest.TestRunner.addPlugin · matlab.unittest.TestRunner.run · matlab.unittest.TestRunner.withTextOutput

Constraints

matlab.unittest.constraints.IsEqualTo · matlab.unittest.constraints.IsFalse · matlab.unittest.constraints.IsTrue

Diagnostics

matlab.unittest.diagnostics.StringDiagnostic · matlab.unittest.TestCase.log

Fixtures

matlab.unittest.fixtures.PathFixture · matlab.unittest.fixtures.TemporaryFolderFixture · matlab.unittest.TestCase.addTeardown · matlab.unittest.TestCase.applyFixture

Plugins

matlab.unittest.plugins.CodeCoveragePlugin.forFolder · matlab.unittest.plugins.TestRunnerPlugin

Qualifications

matlab.unittest.TestCase.assertEqual · matlab.unittest.TestCase.assertThat · matlab.unittest.TestCase.assertTrue · matlab.unittest.TestCase.assumeEqual · matlab.unittest.TestCase.assumeTrue · matlab.unittest.TestCase.fatalAssertTrue · matlab.unittest.TestCase.verifyEmpty · matlab.unittest.TestCase.verifyEqual · matlab.unittest.TestCase.verifyFalse · matlab.unittest.TestCase.verifyGreaterThan · matlab.unittest.TestCase.verifyLessThan · matlab.unittest.TestCase.verifyNotEmpty · matlab.unittest.TestCase.verifyNotEqual · matlab.unittest.TestCase.verifyThat · matlab.unittest.TestCase.verifyTrue

Source you can read

Every RunMat function's source is public. Read exactly how testsuite is executed, line by line, in Rust.

  • View the source for testsuite in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • Targets and selection
  • Controls and limitations
  • Examples
  • Discover a script without executing its body
  • Select a semantic test procedure by name
  • Using testsuite with coding agents
  • FAQ
  • Related Testing functions
  • Testing
  • Constraints
  • Diagnostics
  • Fixtures
  • Plugins
  • Qualifications
  • Source you can read
  • About RunMat