Test File Search - File Matching #41
Closed
wojciech-kulik
announced in
Tips & Tricks
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
xcodebuildlogs provide the following information about the test: target, test class, and test name. The plugin needs to find the file location based on that, which is not a trivial task.In order to support multiple cases, the plugin allows you to choose the search mode. It offers four modes to find a test class. You can change it by setting
test_search.file_matching.filename- it assumes that the test class name matches the file name. It finds matching files and then based on the build output, it checks whether the file belongs to the desired target.lsp- it uses LSP to find the class symbol. Each match is checked if it belongs to the desired target.filename_lspfirst tryfilenamemode, if it fails trylspmode.lsp_filenamefirst trylspmode, if it fails tryfilenamemode.filename_lspis the recommended mode, becausefilenamesearch is faster thanlsp, but you also havelspfallback if there is no match fromfilename.👉 If you notice that your test results don't appear or appear in incorrect files, try playing with these modes.
👉 If your test results don't appear, you can also try disabling
test_search.target_matching. This way the plugin will always use the first match without checking its target.Beta Was this translation helpful? Give feedback.
All reactions