Exemplo n.º 1
0
        private static int Main(string[] args)
        {
            int returnValue = 0;

            Arguments arguments = new Arguments(args);

            if (arguments.ArgumentsAreValid)
            {
                ScenarioRunner scenarioRunner = new ScenarioRunner(arguments);

                // Run the automation. This will write traces to the current or provided directory if the user requested it
                if (arguments.Browsers.Count > 0 && arguments.Scenarios.Count > 0)
                {
                    scenarioRunner.Run();
                }

                // If traces have been written, process them into a csv of results
                // Only necessary if we're tracing and/or measuring responsiveness
                if ((arguments.UsingTraceController && arguments.DoPostProcessing) || arguments.MeasureResponsiveness)
                {
                    PerfProcessor perfProcessor = new PerfProcessor((arguments.SelectedMeasureSets).ToList());
                    perfProcessor.Execute(arguments.EtlPath, arguments.EtlPath, scenarioRunner.GetResponsivenessResults());
                }
            }
            else
            {
                returnValue = 1;
            }
            return(returnValue);
        }
Exemplo n.º 2
0
        private static int Main(string[] args)
        {
            int returnValue = 0;

            Arguments arguments = new Arguments(args);

            if (arguments.ArgumentsAreValid)
            {
                var         heartBeatCtx  = new CancellationTokenSource();
                Task <bool> heartBeatTask = StartLogHeartBeat(heartBeatCtx, arguments.EtlPath);

                ScenarioRunner scenarioRunner = new ScenarioRunner(arguments);

                // Run the automation. This will write traces to the current or provided directory if the user requested it
                if (arguments.Browsers.Count > 0 && arguments.Scenarios.Count > 0)
                {
                    scenarioRunner.Run();
                }

                // If traces have been written, process them into a csv of results
                // Only necessary if we're tracing and/or measuring responsiveness
                if ((arguments.UsingTraceController && arguments.DoPostProcessing) || arguments.MeasureResponsiveness)
                {
                    PerfProcessor perfProcessor = new PerfProcessor((arguments.SelectedMeasureSets).ToList());
                    perfProcessor.Execute(arguments.EtlPath, arguments.EtlPath, scenarioRunner.GetResponsivenessResults(), ScenarioRunner._extensionsNameAndVersion);
                    generateCharts(arguments.EtlPath, arguments.EtlPath, arguments.GenerateChartsWithSymbols);
                }

                heartBeatCtx.Cancel();
                var heartBeat = heartBeatTask.Result;
            }
            else
            {
                returnValue = 1;
            }
            return(returnValue);
        }