Beispiel #1
0
        //---------------------------------------------------------------------
        public async Task RunAsync(WorkerOptions?options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            Thread.CurrentThread.CurrentCulture   = CultureInfo.InvariantCulture;
            Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;

            _globHandler.ExpandWildcards(options);

            ITestResultXmlConverter converter;

            if (options.ConvertToJunit)
            {
                converter = new Trx2JunitTestResultXmlConverter();
                Console.WriteLine($"Converting {options.InputFiles.Count} trx file(s) to JUnit-xml...");
            }
            else
            {
                converter = new Junit2TrxTestResultXmlConverter();
                Console.WriteLine($"Converting {options.InputFiles.Count} junit file(s) to trx-xml...");
            }
            DateTime start = DateTime.Now;

            await Task.WhenAll(options.InputFiles.Select(input => this.ConvertAsync(converter, input, options.OutputDirectory)));

            Console.WriteLine($"done in {(DateTime.Now - start).TotalSeconds} seconds. bye.");
        }
Beispiel #2
0
        public async Task RunAsync(WorkerOptions?options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            Thread.CurrentThread.CurrentCulture   = CultureInfo.InvariantCulture;
            Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;

            _globHandler.ExpandWildcards(options);

            Console.WriteLine($"Converting {options.InputFiles.Count} trx file(s) to JUnit-xml...");
            DateTime start = DateTime.Now;

            await Task.WhenAll(options.InputFiles.Select(trx => this.Convert(trx, options.OutputDirectory)));

            Console.WriteLine($"done in {(DateTime.Now - start).TotalSeconds} seconds. bye.");
        }