Exemplo n.º 1
0
        private static void Main(string[] args)
        {
            if (!TryParseArgs(args, out List <CoverageInfo> inputFiles))
            {
                return;
            }

            if (inputFiles.Count == 0)
            {
                Console.WriteLine("Error: No input files provided");
                return;
            }

            var cinfo = new CoverageInfo();

            foreach (var other in inputFiles)
            {
                cinfo.Merge(other);
            }

            // Dump
            string name          = OutputFilePrefix;
            string directoryPath = Environment.CurrentDirectory;

            var activityCoverageReporter = new ActivityCoverageReporter(cinfo);

            string[] graphFiles    = Directory.GetFiles(directoryPath, name + "_*.dgml");
            string   graphFilePath = Path.Combine(directoryPath, name + "_" + graphFiles.Length + ".dgml");

            Console.WriteLine($"... Writing {graphFilePath}");
            activityCoverageReporter.EmitVisualizationGraph(graphFilePath);

            string[] coverageFiles    = Directory.GetFiles(directoryPath, name + "_*.coverage.txt");
            string   coverageFilePath = Path.Combine(directoryPath, name + "_" + coverageFiles.Length + ".coverage.txt");

            Console.WriteLine($"... Writing {coverageFilePath}");
            activityCoverageReporter.EmitCoverageReport(coverageFilePath);
        }