[Ann] new versions of VS Code extensions Alcotest and Expect & Inline tests, now on Open VSX too

I’ve just updated both VS Code testing extensions, as of now they are available at the Open VSX Registry too.

Bugfixes:
The Opam environment of the project’s root is used, so the Dune executable in the sandbox of the project directory is used by default if such a sandbox exists. Otherwise the environment of the current Opam switch.
If Dune does not work (a call of dune --version fails), an error message box is displayed.

Expect & Inline PPX

VS Marketplace
Open VSX
GitHub

Alcotest & Inline Alcotest

VS Marketplace
Open VSX
GitHub

Changelog

  • Add error message window if dune does not work in a workspace.

Bugfixes

  • Use the current Opam environment to be able to use local executables like dune.

Internal Changes

  • Add tests to check the parsing of opam env.
2 Likes

New versions for both extensions that fix a critical bug: until now if there had been more than one test runner the tests from all other runners had been deleted during test discovery.

Important feature added to the Expect and Inline extension: on startup and Refresh Tests now the tests are not run, but only a list of tests is generated. This speeds up test discovery significantly (and now both extensions work the same).

Alcotest Test Explorer Version 0.6.0

VS Code Marketplace
Open VSX
GitHub

Changelog

  • Make the path to the Dune executable configurable. Can now be either an absolute path, a path relative to the project root or just dune, which is looked up in the local Opam environment or the PATH.
  • Add a message window to ask for a reload if a configuration value has changed.
  • Update documentation

Bugfixes

  • Do not delete the test groups of all other test runners if there exists more than one test runner.

Expect and Inline Tests Version 0.5.0

VS Code Marketplace
Open VSX
GitHub

Changelog

  • No need to run all tests at startup or refresh. Use the -list-test-names argument of the inline test runners.
  • New configuration values:
    • expectppx.discoverInSources - Whether to parse source files on open and save for tests and update the Test Explorer tree. Should be set to true if expectppx.discoverOnStartup is false.
    • expectppx.dunePath - Set an absolute path or a path relative to the project root of the Dune executable. Default: dune - use the one in the local Opam environment or in PATH. See Issue #3.
    • expectppx.excludeRunners - A list of inline test runner names to be excluded from test discovery an startup or refresh, e.g. because they take too long to finish.
  • Add a message window to ask for a reload if a configuration value has changed.
  • Disable ANSI color escape sequences in output of test failures.
  • Update the documentation.

Bugfixes

  • Fix bug when tests from other test runners are deleted on startup or refresh having more than one inline test runner. See Issue #3.

Internal Changes

  • Remove ANSI escape sequences from test fixtures.
  • Add yarn target for the Open VSX Registry.
1 Like

I’ve just released a new version of the Expect testing extension. The Expect test result of a failed test now uses VS Code’s diff view. The actual result output of the test can be displayed by hovering the stanza let%expect_test.

Expect and Inline Tests Version 0.6.0

VS Code Marketplace
Open VSX
GitHub

Changelog

  • Show the expected and actual values of Expect tests in VS Codes’ diff view. See Issue #6.

These releases of both extensions provide better handling of Dune locks.

The new versions fix a bug where a dune process waiting to acquire the lock couldn’t be cancelled.
And after 30s of not acquiring the Dune lock an error message is displayed.

Alcotest Test Explorer Version 0.7.0

VS Code Marketplace
Open VSX
GitHub

Changelog

  • If the dune lock can’t be acquired for 30s, raise an error window and ask the user what to do.
  • Update the documentation.

Bugfixes

  • Make Cancel Test Run stop Dune processes waiting for the lock too. See Issue #9.

Internal Changes

  • Add yarn target for the Open VSX Registry.

Expect and Inline Tests Version 0.7.0

VS Code Marketplace
Open VSX
GitHub

Changelog

  • If the dune lock can’t be acquired for 30s, raise an error window and ask the user what to do.
  • Update the documentation.

Bugfixes

  • Make Cancel Test Run stop Dune processes waiting for the lock too. See Issue #9.