Ejemplo n.º 1
0
        public void RunTests(
            IEnumerable <TestCase> tests,
            IRunContext context,
            IFrameworkHandle frameworkHandle)
        {
            Parallel.ForEach(tests.GroupBy(t => t.Source), group =>
            {
                if (cancel)
                {
                    return;
                }

                QmlTestRunnerWrapper.RunTests(qmlTestRunner, group.Key, group, frameworkHandle, context);
            }
                             );
        }
Ejemplo n.º 2
0
        internal static IEnumerable <TestCase> GetTests(
            IQmlTestRunner qmlTestRunner,
            IEnumerable <string> sourceFiles,
            IDiscoveryContext discoveryContext,
            IMessageLogger logger)
        {
            ConcurrentBag <TestCase> tests = new ConcurrentBag <TestCase>();

            Parallel.ForEach(sourceFiles, s =>
            {
                foreach (TestCase testCase in QmlTestRunnerWrapper.GetTests(qmlTestRunner, s, logger, discoveryContext))
                {
                    tests.Add(testCase);
                }
            });

            return(tests);
        }