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
-
xcodebuild
logs 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_lsp
first tryfilename
mode, if it fails trylsp
mode.lsp_filename
first trylsp
mode, if it fails tryfilename
mode.filename_lsp
is the recommended mode, becausefilename
search is faster thanlsp
, but you also havelsp
fallback 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