File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,16 @@ import * as vscode from 'vscode';
1111import * as serverUtils from "../omnisharpUtils" ;
1212import * as protocol from '../protocol' ;
1313
14+ let _testOutputChannel : vscode . OutputChannel = undefined ;
15+
16+ function getTestOutputChannel ( ) : vscode . OutputChannel {
17+ if ( _testOutputChannel == undefined ) {
18+ _testOutputChannel = vscode . window . createOutputChannel ( ".NET Test Log" ) ;
19+ }
20+
21+ return _testOutputChannel ;
22+ }
23+
1424export function registerDotNetTestRunCommand ( server : OmnisharpServer ) : vscode . Disposable {
1525 return vscode . commands . registerCommand (
1626 'dotnet.test.run' ,
@@ -25,15 +35,17 @@ export function registerDotNetTestDebugCommand(server: OmnisharpServer): vscode.
2535
2636// Run test through dotnet-test command. This function can be moved to a separate structure
2737export function runDotnetTest ( testMethod : string , fileName : string , server : OmnisharpServer ) {
38+ getTestOutputChannel ( ) . show ( ) ;
39+ getTestOutputChannel ( ) . appendLine ( 'Running test ' + testMethod + '...' ) ;
2840 serverUtils
2941 . runDotNetTest ( server , { FileName : fileName , MethodName : testMethod } )
3042 . then (
3143 response => {
3244 if ( response . Pass ) {
33- vscode . window . showInformationMessage ( 'Test passed' ) ;
45+ getTestOutputChannel ( ) . appendLine ( 'Test passed \n ' ) ;
3446 }
3547 else {
36- vscode . window . showErrorMessage ( 'Test failed' ) ;
48+ getTestOutputChannel ( ) . appendLine ( 'Test failed \n ' ) ;
3749 }
3850 } ,
3951 reason => {
You can’t perform that action at this time.
0 commit comments