private async Task TestExecutionStartingAsync(IOperation operation)
        {
            cancelling        = false;
            runningInParallel = false;
            StopCoverage();

            var settings = appOptionsProvider.Get();

            if (!settings.Enabled)
            {
                CombinedLog("Coverage not collected as FCC disabled.");
                reportGeneratorUtil.EndOfCoverageRun();
                return;
            }

            msCodeCoverageCollectionStatus = await msCodeCoverageRunSettingsService.IsCollectingAsync(testOperationFactory.Create(operation));

            if (msCodeCoverageCollectionStatus == MsCodeCoverageCollectionStatus.NotCollecting)
            {
                if (settings.RunInParallel)
                {
                    runningInParallel = true;
                    fccEngine.ReloadCoverage(() =>
                    {
                        return(testOperationFactory.Create(operation).GetCoverageProjectsAsync());
                    });
                }
                else
                {
                    CombinedLog("Coverage collected when tests finish. RunInParallel option true for immediate");
                }
            }
        }
Exemple #2
0
        private void TestExecutionStarting(IOperation operation)
        {
            fccEngine.StopCoverage();

            var settings = appOptionsProvider.Get();

            if (!settings.Enabled)
            {
                return;
            }
            if (settings.RunInParallel)
            {
                fccEngine.ReloadCoverage(() =>
                {
                    var testOperation = testOperationFactory.Create(operation);
                    return(testOperation.GetCoverageProjectsAsync());
                });
            }
        }