mathworks / mathworks/MATLAB-extension-for-vscode

Testfile Folder in Submodule

Open
#345 1 comment 0 reactions 1 assignee View on GitHub

@tsharmaMW is already working on this.

Since Aug 18, 2026.

bug
Dominant language
TypeScript
Stars
435
Forks
40
PR merge metrics
No merged PRs in 30d

Description

We placed the unit tests directly into each submodule:

/+Module1/+unitTests/TestFile.m

After adding the testfile folder or adding the testfile (click on "Add Test Folder" button or "Add Test File" button), the tests and testfiles are shown as:

Module1.unitTests.TestClass.m
  TestFunction

Running the test results in "The test run did not record any output. "

Right-click on Test --> Go to Test I receive the following error message:
The editor could not be opened because the file was not found.

The editor tries to open the file Module1.unitTests.Testclass.m

Conclusion: When loading test files placed in a submodule, the extension assumes that the path is Module.submodule.testfile.m instead of +Module/+submodule/testfile.m

Expected behaviour: Testfiles in submodules (+Folder/+Folder2/testfile.m) should work.

Useful Information

  • VSCode: 1.133.0
  • Matlab Extension: v1.3.13
  • Matlab 2023b
  • OS: Windows 11

All tests run without any issue in Matlab

Screenshots

File in Explorer:
Image
File in Testing:
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.