package tezt
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Test framework for unit tests, integration tests, and regression tests
Install
dune-project
Dependency
Authors
Maintainers
Sources
tezt-3.1.0.tar.bz2
md5=d395cb9e663635ea8795f47c9bd9249f
sha512=d7c62899684ec202a98669eb575a2dc3bd1f8cf0430447c789a9d0aadc04a611d0dcfbcd7d61c613d4b7c78fd1bc4c533e4fcb48dbc8e3f19feaabe4ddd78723
doc/CHANGES.html
Changelog
Version 3.1.0
Breaking Changes
- On OCaml 4.12.1 or earlier, the new
?seedargument can break calls toTest.registerwhich are written using the formTest.register ~__FILE__ ~title ~tags @@ fun () -> .... To fix this, either upgrade to OCaml 4.13.0 or later, add?seed: None, or replace@@with parentheses. - Internal type
Test.SCHEDULER.responsechanged. This change is very unlikely to impact you unless you wrote your own backend. --matchnow applies to both test title and test filename.- Removed the
--starting-portcommand-line argument. You can use-a starting-port=instead. - Selecting a
--jobthat is empty now results in an error. This means that if you have more jobs than tests in your CI, your CI will fail. - Skipping all tests with
--skipor--onlynow results in an error. This makes those command-line arguments behave like other filters. - Tests are now registered with the full value passed as
~__FILE__toTest.register, instead of just the basename.
New Features
- Added
?seedtoTest.registerand the--seedcommand-line parameter to help control the determinism of randomness. - Added
--log-worker-idswhich adds worker ids to logs when--job-countis more than 1. - Added
--not-matchto deselect tests with a title that matches a regular expression. - Added
--not-fileto deselect tests with a given filename. --timecan now be passed along with--from-record <record.json> --listto pretty-print timings from previous executions.--file FILEnow selects all tests registered from a source file that ends withFILE.- Added
--not-file FILEto deselect tests registered from a source file that ends withFILE. - In
Cli: added_optvariants for functions that retrieve custom arguments.
Bug Fixes
- Fixed a bug where the log file does not contain logs from tests in the presence of
--job-count. In the presence of--job-count Nand--log-file FILE, test results are now written toFILE, where as the logs from tests are written in a separate file per worker namedBASENAME-WORKER_ID.EXT, as detailed in--help. - Fixed a bug where a warning is not emitted when the argument to
--not-titledoes not correspond to any known files. - Fixed a bug where the list of selectors printed with an empty test selection would not contain
--not-title. - Remove unused argument
--starting-port.
Version 3.0.0
Breaking Changes
- Argument
~output_fileofRegression.registeris now optional and has been renamed into?file. Previously,~output_filewas automatically prefixed by the value given to--regression-dir. Now, files are put in a directory namedexpectednext to the test itself, and the default filename is a sanitized version of the test title. - Removed the
--regression-dircommand-line parameter.
New Features
- The
teztDune library was split intotezt.coreandtezt. Librarytezt.corecontains the parts that can run both on UNIX and using Node.js. It does not containTest.runthough so it cannot be used on its own. Libraryteztis the UNIX backend. It also includestezt.core, so this is not a breaking change. - New library
tezt.jsis a partial backend for Node.js. Compared totezt, it does not contain modulesProcess,TempandRunner. - Added
--resume(short-hand:-r) and--resume-file, which allow to resume a previous run. For instance, if the previous run stopped after a failed test, and if that previous run was itself ran with--resumeor--resume-file, resume from this run to avoid running the tests that already succeeded again. - Added
--match(short-hand:-m) to select tests with a title that match a regular expression. - Added a
?timeoutargument toProcess.terminateandProcess.clean_up. These functions sendSIGTERMto processes. If this timeout is reached without the process actually terminating,Process.terminatealso sendsSIGKILL. - Added module
Diffwhich allows to compare two sequences. It is used internally by theRegressionmodule to compare test outputs between runs. - Added module
Mainwith functionMain.run, which is the same asTest.run. In practice you can still useTest.run, which now delegates toMain.run. ButTest.runis not available intezt.core, only inteztandtezt.js. This is not a breaking change since existing applications would usetezt, nottezt.coredirectly. - Added
Base.project_rootwhich is the path to the root of the current dune project according to environment variableDUNE_SOURCEROOT, falling back to the current directory if unavailable. - Added
Base.spanto split a list in two sublists given a predicate. - Added
Base.rexf, a short-hand forrex @@ sf. - Added
Check.file_exists,Check.file_not_exists,Check.directory_existsandCheck.directory_not_exists. - Added
Check.is_trueandCheck.is_false. - Added
Check.jsonandCheck.json_u, type definitions forJSON.tandJSON.urespectively. - Added support for
int32in theJSONmodule. - Added
JSON.merge_objects,JSON.filter_map_objectandJSON.filter_object. - Added
JSON.equalandJSON.equal_u, equality predicates onJSON.tandJSON.urespectively. - Added
Temp.set_pid. TheTempmodule no longer callsUnix.getpiddirectly, this is done byTest.runinstead, which callsTemp.set_pid. This allows backends whereUnix.getpidcannot be used, like JS. - Added
Test.run_with_scheduler, and theTest.SCHEDULERsignature. AddedTest.get_test_by_titleandTest.run_one. Those functions are used internally to provide different backends (UNIX / JS), but users usually would not have any use for them. - Some fields in records obtained with
--recordbecame optional, with default values. New records may not be compatible with old versions of Tezt. - Added module
Process_hookswhich contains the type definition forProcess.hooks.
Bug Fixes
- Fixed some cases where regression tests would crash instead of failing gracefully for some system errors.
Temp.clean_upno longer follows symbolic links, it just deletes the links themselves.- Fixed
--junitwhich no longer worked when using-j. - Fixed
--loop-count 0which did not actually run zero loops. - Fixed a bug where Tezt would exit prematurely without running tests when using
--on-unknown-regression-files deleteor--on-unknown-regression-files fail. - Fixed a redundancy in the warning message when removing a non-empty temporary directories registered with the
Tempmodule. - Fixed some whitespace issues in
--help.
Older Versions
Tezt 2.0.0 was the first announced release and as such it had no changelog. Tezt 1.0.0 was released in opam but was not announced.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page