Skip to content

Commit 162e8bc

Browse files
committed
FunctionalTests: remove ExtraCoverage category
A limited subset of functional tests are marked as belonging to the ExtraCoverage category, which was introduced in the microsoft/VFSForGit#1046 PR as an enhancement over the FullSuiteOnly category from the Azure Repos PR 302803. The intent was to make the default functional test run faster by excluding some less-fragile tests. However, in Scalar, many of these tests are also marked with NeedsUpdatesForNonVirtualizedMode and therefore do not run at all, while the ones which remain have been running in CI on the macOS platform but not Windows, because Scripts/Mac/RunFunctionalTests.sh passes the --full-suite option. In order to simplify the CI and functional test framework, we eliminate the ExtraCoverage category entirely, which ensures all working tests run on all platforms in CI.
1 parent 562f127 commit 162e8bc

7 files changed

Lines changed: 1 addition & 21 deletions

File tree

AuthoringTests.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ The functional tests are built on NUnit 3, which is available as a set of NuGet
4040

4141
#### Selecting Which Tests are Run
4242

43-
By default, the functional tests run a subset of tests as a quick smoke test for developers. There are three mutually exclusive arguments that can be passed to the functional tests to change this behavior:
43+
By default, the functional tests run a subset of tests as a quick smoke test for developers. There are mutually exclusive arguments that can be passed to the functional tests to change this behavior:
4444

4545
- `--full-suite`: Run all configurations of all functional tests
46-
- `--extra-only`: Run only those tests marked as "ExtraCoverage" (i.e. the tests that are not run by default)
4746
- `--windows-only`: Run only the tests marked as being Windows specific
4847

4948
**NOTE** `Scripts\RunFunctionalTests.bat` already uses some of these arguments. If you run the tests using `RunFunctionalTests.bat` consider locally modifying the script rather than passing these flags as arguments to the script.

Scalar.FunctionalTests/Categories.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ namespace Scalar.FunctionalTests
22
{
33
public static class Categories
44
{
5-
public const string ExtraCoverage = "ExtraCoverage";
65
public const string GitCommands = "GitCommands";
76

87
public const string WindowsOnly = "WindowsOnly";

Scalar.FunctionalTests/Program.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,6 @@ public static void Main(string[] args)
6969
}
7070
else
7171
{
72-
if (runner.HasCustomArg("--extra-only"))
73-
{
74-
Console.WriteLine("Running only the tests marked as ExtraCoverage");
75-
includeCategories.Add(Categories.ExtraCoverage);
76-
}
77-
else
78-
{
79-
excludeCategories.Add(Categories.ExtraCoverage);
80-
}
81-
8272
ScalarTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.DefaultRunners;
8373
}
8474

@@ -92,10 +82,6 @@ public static void Main(string[] args)
9282
if (runner.HasCustomArg("--windows-only"))
9383
{
9484
includeCategories.Add(Categories.WindowsOnly);
95-
96-
// RunTests unions all includeCategories. Remove ExtraCoverage to
97-
// ensure that we only run tests flagged as WindowsOnly
98-
includeCategories.Remove(Categories.ExtraCoverage);
9985
}
10086

10187
excludeCategories.Add(Categories.MacOnly);

Scalar.FunctionalTests/Tests/EnlistmentPerFixture/CacheServerTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Scalar.FunctionalTests.Tests.EnlistmentPerFixture
66
{
77
[TestFixture]
8-
[Category(Categories.ExtraCoverage)]
98
public class CacheServerTests : TestsWithEnlistmentPerFixture
109
{
1110
private const string CustomUrl = "https://myCache";

Scalar.FunctionalTests/Tests/EnlistmentPerFixture/FetchStepWithoutSharedCacheTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace Scalar.FunctionalTests.Tests.EnlistmentPerFixture
99
{
1010
[TestFixture]
11-
[Category(Categories.ExtraCoverage)]
1211
public class FetchStepWithoutSharedCacheTests : TestsWithEnlistmentPerFixture
1312
{
1413
private const string PrefetchPackPrefix = "prefetch";

Scalar.FunctionalTests/Tests/EnlistmentPerFixture/ScalarUpgradeReminderTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ namespace Scalar.FunctionalTests.Tests.EnlistmentPerFixture
1212
{
1313
[TestFixture]
1414
[NonParallelizable]
15-
[Category(Categories.ExtraCoverage)]
1615
[Category(Categories.WindowsOnly)]
1716
[Category(Categories.NeedsUpdatesForNonVirtualizedMode)]
1817
public class UpgradeReminderTests : TestsWithEnlistmentPerFixture

Scalar.FunctionalTests/Tests/MultiEnlistmentTests/ConfigVerbTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace Scalar.FunctionalTests.Tests.MultiEnlistmentTests
88
{
99
[TestFixture]
10-
[Category(Categories.ExtraCoverage)]
1110
[Category(Categories.NeedsUpdatesForNonVirtualizedMode)]
1211
public class ConfigVerbTests : TestsWithMultiEnlistment
1312
{

0 commit comments

Comments
 (0)