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);
            }
                             );
        }
        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);
        }