@@ -25,7 +25,9 @@ CONTENTS *omnisharp-contents
2525 3.7 Miscellaneous ....................... |omnisharp-miscellaneous-options|
2626 4. Commands ............................... |omnisharp-commands|
2727 5. Autocmds ............................... |omnisharp-autocmds|
28- 6. Integrations ........................... |omnisharp-integrations|
28+ 6. Test runner ............................ |omnisharp-testrunner|
29+ 6.1 Mappings ............................ |omnisharp-testrunner-mappings|
30+ 7. Integrations ........................... |omnisharp-integrations|
2931
3032===============================================================================
31331. DEPENDENCIES *omnisharp-dependencies*
@@ -43,7 +45,7 @@ Optional:~
43452. USAGE *omnisharp-usage*
4446
4547Opening a `*.cs` file will automatically start an instance of omnisharp-server
46- (if using vim 8.0+, neovim or vim-dispatch). Symantic completions are triggered
48+ (if using vim 8.0+, neovim or vim-dispatch). Semantic completions are triggered
4749using omni-completion (CTRL-X_CTRL-O in insert mode), or using an
4850autocompletion plugin such as asyncomplete or Deoplete.
4951
@@ -375,8 +377,8 @@ Default: atcursor >
375377
376378 *g:OmniSharp_runtests_echo_output*
377379When running unit tests with |:OmniSharpRunTest| and |:OmniSharpRunTestsInFile|
378- or from the test runner , echo all test runner output to the |message-history|,
379- so it can be viewed with |:messages|.
380+ or from the |omnisharp-testrunner| , echo all test runner output to the
381+ |message-history|, so it can be viewed with |:messages|.
380382Default: 0
381383
382384 *g:OmniSharp_runtests_parallel*
@@ -404,6 +406,47 @@ Default: 0
404406Open the |omnisharp-testrunner| automatically when running tests.
405407Default: 1
406408
409+ *g:OmniSharp_testrunner_banner*
410+ Display the |omnisharp-testrunner| help/introduction banner when opening the
411+ testrunner. When this option is set to 0, the banner may still be toggled with
412+ the <F1> (default) toggle mapping.
413+ Default: 1
414+
415+ *g:OmniSharp_testrunner_glyph*
416+ Display a passed/failed "glyph" string beside completed test results in the
417+ |omnisharp-testrunner|.
418+ Default: 1
419+
420+ *g:OmniSharp_testrunner_glyph_failed*
421+ The "glyph" string to display beside failed completed tests in the testrunner.
422+ Default: ✘
423+
424+ *g:OmniSharp_testrunner_glyph_passed*
425+ The "glyph" string to display beside passed completed tests in the testrunner.
426+ Default: ✔
427+
428+ *g:OmniSharp_testrunner_loglevel*
429+ The type of build and test logs to output in the |omnisharp-testrunner|.
430+
431+ all All build output and test runner output is displayed.
432+
433+ error When a build error occurs, the error message and stack
434+ trace are output.
435+
436+ none Only build error messages will be output.
437+
438+ Default: error >
439+ let g:OmniSharp_testrunner_loglevel = 'all'
440+ <
441+ *g:OmniSharp_testrunner_spinner*
442+ Display a "running" spinner animation when running tests in the testrunner.
443+ Default: 1
444+
445+ *g:OmniSharp_testrunner_spinnersteps*
446+ A list of "step" strings to be displayed as the |omnisharp-testrunner|
447+ "spinner" animation.
448+ Default: ['∙∙∙', '●∙∙', '∙●∙', '∙∙●', '∙∙∙']
449+
407450-------------------------------------------------------------------------------
4084513.6 INTEGRATIONS *omnisharp-integration-options*
409452
@@ -603,18 +646,21 @@ convenient user re-mapping. These can be used like so: >
603646 *<Plug>(omnisharp_run_test_no_build)*
604647:OmniSharpRunTest[!]
605648 Run the current unit test. The cursor can be anywhere in the test method.
649+ The |omnisharp-testrunner| window will be opened to display the test
650+ status and results.
606651 If the test fails, the failure message and location will be displayed in
607- the quickfix list, along with the error stack trace, if one exists.
652+ the testrunner, or optionally (see |g:OmniSharp_runtests_quickfix|) in the
653+ quickfix list, along with the error stack trace if one exists.
608654
609655 When called with ! or the |<Plug>(omnisharp_run_test_no_build)| mapping, the
610656 project is not built before running the test.
611657
612- *:OmniSharpDebugTest*
613- *<Plug>(omnisharp_debug_test)*
614- *<Plug>(omnisharp_debug_test_no_build)*
658+ *:OmniSharpDebugTest*
659+ *<Plug>(omnisharp_debug_test)*
660+ *<Plug>(omnisharp_debug_test_no_build)*
615661:OmniSharpDebugTest[!]
616662 Debug the current unit test with Vimspector. The cursor can be anywhere in
617- the test method. The quickfix list is not populated with the test result.
663+ the test method.
618664
619665 When called with ! or the |<Plug>(omnisharp_debug_test_no_build)| mapping,
620666 the project is not built before starting the debugger.
@@ -623,8 +669,9 @@ convenient user re-mapping. These can be used like so: >
623669 *<Plug>(omnisharp_run_tests_in_file)*
624670 *<Plug>(omnisharp_run_tests_in_file_no_build)*
625671:OmniSharpRunTestsInFile[!]
626- Run all unit tests in the current file. The quickfix list will be
627- populated with the test results of all tests.
672+ Run all unit tests in the current file. When |g:OmniSharp_runtests_quickfix|
673+ is enabled, the quickfix list will be populated with the results of all
674+ tests.
628675 Optionally accepts one or more filenames of files to run tests for.
629676>
630677 " Run all unit tests in the current file
@@ -648,6 +695,9 @@ convenient user re-mapping. These can be used like so: >
648695 :OmniSharpOpenLog vsplit
649696 :OmniSharpOpenLog tabedit
650697<
698+ *:OmniSharpOpenTestRunner*
699+ Open the |omnisharp-testrunner| window
700+
651701 *:OmniSharpGetCodeActions*
652702 *<Plug>(omnisharp_code_actions)*
653703:OmniSharpGetCodeActions
@@ -789,7 +839,73 @@ OmniSharpStopped
789839 Fired when the server process is stopped.
790840
791841===============================================================================
792- 6. INTEGRATIONS *omnisharp-integrations*
842+ 6. TEST RUNNER *omnisharp-testrunner*
843+
844+ The test runner provides an overview of unit tests which have been run, along
845+ with the test status (running/passed/failed/not run) and any outputs that may
846+ be produced (exceptions and Console output).
847+
848+ Open the test runner window by either running a test (with e.g.
849+ |:OmniSharpRunTest|) or with the |:OmniSharpOpenTestRunner| command.
850+
851+ Any time a new test is run, it (along with all other tests in the same file)
852+ is added to the runner. Tests remain visible in the test runner window until
853+ they are manually removed.
854+
855+ Tests are grouped under the files they are contained in, which are in turn
856+ grouped by project. Folds are used to collapse and expand sections, so a
857+ project/file/output section can be hidden or displayed using standard vim
858+ |folding-commands|.
859+
860+ To disable the testrunner and instead use the quickfix list to navigate and
861+ display test results, use the following settings: >
862+ let g:OmniSharp_testrunner = 0
863+ let g:OmniSharp_runtests_quickfix = 1
864+ <
865+ -------------------------------------------------------------------------------
866+ 6.1 MAPPINGS *omnisharp-testrunner-mappings*
867+
868+ The following |<Plug>| mappings and associated default recursive mappings are
869+ provided in the test runner window.
870+
871+ *<Plug>(omnisharp_testrunner_navigate)*
872+ Default: <CR>
873+ Navigate to the test under the cursor. When the used on a error stack trace
874+ location in a failed test result, navigate to the stack location.
875+
876+ *<Plug>(omnisharp_testrunner_togglebanner)*
877+ Default: <F1>
878+ Toggle display of the help/intro banner. Note that the banner can be hidden
879+ initially using the |g:OmniSharp_testrunner_banner| setting.
880+
881+ *<Plug>(omnisharp_testrunner_run)*
882+ Default: <F5>
883+ Run the test(s) under the cursor. When the cursor is on a line representing a
884+ single test (the test itself or part of its output) then just that single test
885+ is run. When the cursor is on a file name, then all tests in the file are run.
886+ When the cursor is on a project name, all previously run tests in the project
887+ will be run.
888+ Note: Running tests in a project only runs previous run tests. This command
889+ does not automatically discover tests in the project.
890+
891+ *<Plug>(omnisharp_testrunner_debug)*
892+ Default: <F6>
893+ Debug the test under the cursor in Vimspector.
894+
895+ *<Plug>(omnisharp_testrunner_set_breakpoints)*
896+ Default: <F9>
897+ When used on a failed test resulting in an error stack, the stack trace
898+ locations are set in Vimspector as breakpoints.
899+
900+ *<Plug>(omnisharp_testrunner_remove)*
901+ Default: dd
902+ Remove the item under the cursor from the test runner. Can be used at the
903+ test, file or project level. Note however that individual tests cannot be
904+ completely removed: subsequent runs of tests in the containing file/project
905+ will still run the removed test.
906+
907+ ===============================================================================
908+ 7. INTEGRATIONS *omnisharp-integrations*
793909
7949106.1 fzf, vim-clap, CtrlP, unite.vim~
795911
0 commit comments