Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Tests - Bancs d'essais > example_run


Launch the examples found in help pages.


example_run(moduleNames, functionNames)
example_run(moduleNames, functionNames, language)
example_run(moduleNames, functionNames, language, testrunOptions, testrunExportToFile)



a string or a vector of strings: references of the modules to test. Each reference can be either of

  • the technical name of a Scilab internal module, that is the name of the root directory of the module.
  • the relative or absolute path of the root directory of the module. This must be used for installed ATOMS modules or other external modules.
By default, all Scilab internal modules are considered, as returned by getmodules().

The root directory of each targeted module must have a ./help subdirectory containing the XML source files of help pages where examples to test are provided, gathered by languages as in the source package of any standard module. Example of the template toolbox_skeleton module:

unix_w("dir /b /s """ + WSCI + "/contrib/toolbox_skeleton/help""")


a string or a string vector: the name(s) of the functions to test. If not given, all help pages of the module(s) will be tested.


a string: the language of the help pages to test. Default value is "en_US".


Used as third input argument for test_run.


Used as forth input argument for test_run.


This function extracts the examples given in help pages and run them using test_run.

When testing examples of any external module, it is mandatory to autoload the module at Scilab startup. This can be achieved either by setting the ATOMS module as autoloaded, or by loading the module through the user's startup file.


if ~isempty(ls("SCI/modules/xml/help/en_US/*.xml")) then // Help XML sources must be available for this example
    example_run("elementary_functions", "insertion")
    example_run("elementary_functions", ["insertion"; "extraction"])
    example_run("elementary_functions", "insertion", "en_US")

See also

  • test_run — Lance les tests unitaires et de non régression présents dans un module ou dans un répertoire
  • bench_run — Lance les tests de performances
  • atomsAutoloadAdd — Add one or several modules to autoload
  • startup — startup file


5.4.0 Function example_run introduced.
Report an issue
<< bench_run Tests - Bancs d'essais test_run >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:33:08 CET 2022