Skip to content

Commit

Permalink
Console output for minimal and quiet (#2191)
Browse files Browse the repository at this point in the history
* added verbosity quiest

* removed source in printing

* added tests

* added tests,changed private members of summary info to local members

* naming corrected

* combined two for loops to one for loop

* removed redundant code and fomatted

* modified resources

* added target framework in quiet case

* added yellow colour to passed and skipped

* if cases formatted

* paased failed to localized

* passed and failed in unit tests changed to localized

* summary added to verbosity minimal case also

* attachments added to minimal and quiet verbosity case

* formatted

* removed milliseconds unit when seconds unit is there

* Forward merge master

* Fix acceptance tests

* Revert build changes

* Fix test

* Format output to align

* Fixing the output, not working adds new line

* check

* Minimal output

* Fix test

* Write when aborting

* Remove empty line

Co-authored-by: Sarabjot Singh <sasin@microsoft.com>
Co-authored-by: nohwnd <me@jakubjares.com>
  • Loading branch information
3 people committed Jul 22, 2020
1 parent 90507c6 commit 6343278
Show file tree
Hide file tree
Showing 19 changed files with 639 additions and 79 deletions.
232 changes: 189 additions & 43 deletions src/vstest.console/Internal/ConsoleLogger.cs

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions src/vstest.console/Internal/SourceSummary.cs
@@ -0,0 +1,38 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Internal
{
using System;

/// <summary>
/// Summary of test results per source.
/// </summary>
internal class SourceSummary
{
/// <summary>
/// Total tests of a test run.
/// </summary>
public int TotalTests { get; set; }

/// <summary>
/// Passed tests of a test run.
/// </summary>
public int PassedTests { get; set; }

/// <summary>
/// Failed tests of a test run.
/// </summary>
public int FailedTests { get; set; }

/// <summary>
/// Skipped tests of a test run.
/// </summary>
public int SkippedTests { get; set; }

/// <summary>
/// Duration of the test run.
/// </summary>
public TimeSpan Duration { get; set; }
}
}
27 changes: 27 additions & 0 deletions src/vstest.console/Resources/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/vstest.console/Resources/Resources.resx
Expand Up @@ -734,10 +734,19 @@
<data name="TestSourcesDiscovered" xml:space="preserve">
<value>A total of {0} test files matched the specified pattern.</value>
</data>
<data name="TestRunSummary" xml:space="preserve">
<value>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</value>
</data>
<data name="InvalidTestRunParameterArgument" xml:space="preserve">
<value>The test run parameter argument '{0}' is invalid. Please use the format below.
Format: TestRunParameters.Parameter(name=\"&lt;name&gt;\", value=\"&lt;value&gt;\")</value>
</data>
<data name="None" xml:space="preserve">
<value>None</value>
</data>
<data name="TestRunSummaryAssemblyAndFramework" xml:space="preserve">
<value> - {0} {1}</value>
</data>
<data name="BlameCollectDumpTestTimeoutNotSupportedForPlatform" xml:space="preserve">
<value>Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform.</value>
</data>
Expand Down
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.cs.xlf
Expand Up @@ -1668,6 +1668,21 @@
<target state="translated">Shromažďování výpisů stavu systému při zablokování pomocí možnosti CollectDump s TestTimeout pro Blame se pro tuto platformu nepodporuje.</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.de.xlf
Expand Up @@ -1668,6 +1668,21 @@
<target state="translated">Das Sammeln von Abbildern bei Reaktionsunfähigkeit über die Option "CollectDump" mit "TestTimeout" für "Blame" wird für diese Plattform nicht unterstützt.</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.es.xlf
Expand Up @@ -1671,6 +1671,21 @@
<target state="translated">La recopilación de volcados de memoria mediante la opción CollectDump con TestTimeout para Blame no se admite en esta plataforma.</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.fr.xlf
Expand Up @@ -1668,6 +1668,21 @@
<target state="translated">La collecte des vidages sur blocage par l'option CollectDump avec TestTimeout pour Blame n'est pas prise en charge pour cette plateforme.</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.it.xlf
Expand Up @@ -1668,6 +1668,21 @@
<target state="translated">L'opzione CollectDump con TestTimeout per Blame non supporta la raccolta dei dump di blocco per questa piattaforma.</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.ja.xlf
Expand Up @@ -1668,6 +1668,21 @@
<target state="translated">このプラットフォームでは、Blame の TestTimeout を使用する CollectDump オプションによるハング ダンプの収集はサポートされていません。</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.ko.xlf
Expand Up @@ -1668,6 +1668,21 @@
<target state="translated">Blame에 대한 TestTimeout이 있는 CollectDump 옵션에 의한 중단 덤프 수집은 이 플랫폼에서 지원되지 않습니다.</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.pl.xlf
Expand Up @@ -1668,6 +1668,21 @@
<target state="translated">Zbieranie zrzutów po zawieszeniu przez opcję CollectDump z opcją TestTimeout programu Blame nie jest obsługiwane w przypadku tej platformy.</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.pt-BR.xlf
Expand Up @@ -1668,6 +1668,21 @@ Altere o prefixo de nível de diagnóstico do agente de console, como mostrado a
<target state="translated">A coleta de despejos de trava pela opção CollectDump com TestTimeout para Blame não é tem suporte para esta plataforma.</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.ru.xlf
Expand Up @@ -1668,6 +1668,21 @@
<target state="translated">Сбор дампов зависаний с помощью параметра CollectDump с TestTimeout для Blame не поддерживается для этой платформы.</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.tr.xlf
Expand Up @@ -1668,6 +1668,21 @@ Günlükler için izleme düzeyini aşağıda gösterildiği gibi değiştirin
<target state="translated">Blame için TestTimeout ile CollectDump seçeneğine göre asılı kalma bilgi dökümlerinin toplanması bu platform için desteklenmiyor.</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.xlf
Expand Up @@ -859,6 +859,21 @@ Format : TestRunParameters.Parameter(name="&lt;name&gt;", value="&lt;value&gt;")
<target state="new">Collecting hang dumps by option CollectDump with TestTimeout for Blame is not supported for this platform.</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
15 changes: 15 additions & 0 deletions src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf
Expand Up @@ -1668,6 +1668,21 @@
<target state="translated">此平台不支持通过 CollectDump with TestTimeout for Blame 选项收集挂起转储。</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummary">
<source>{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</source>
<target state="new">{0} - Failed: {1}, Passed: {2}, Skipped: {3}, Total: {4}, Duration: {5}</target>
<note></note>
</trans-unit>
<trans-unit id="None">
<source>None</source>
<target state="new">None</target>
<note></note>
</trans-unit>
<trans-unit id="TestRunSummaryAssemblyAndFramework">
<source> - {0} {1}</source>
<target state="new">- {0} {1}</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>

0 comments on commit 6343278

Please sign in to comment.