private TestCase ConvertSpecificationToTestCase(SpecificationInfo specification, Settings settings)
        {
            VisualStudioTestIdentifier vsTestId = specification.ToVisualStudioTestIdentifier(currentContext);

            return new TestCase(vsTestId.FullyQualifiedName, this.executorUri, this.assemblyPath) {
                DisplayName = settings.DisableFullTestNameInOutput ? specification.Name : $"{this.currentContext?.TypeName}.{specification.FieldName}",
            };
        }
        public void RunAssembly(string source, Settings settings, Uri executorUri, IFrameworkHandle frameworkHandle)
        {
            source = Path.GetFullPath(source);

            using (var scope = new IsolatedAppDomainExecutionScope<AppDomainExecutor>(source)) {
                VSProxyAssemblySpecificationRunListener listener = new VSProxyAssemblySpecificationRunListener(source, frameworkHandle, executorUri, settings);

                AppDomainExecutor executor = scope.CreateInstance();
                executor.RunAllTestsInAssembly(source, listener);
            }
        }
        public VSProxyAssemblySpecificationRunListener(string assemblyPath, IFrameworkHandle frameworkHandle, Uri executorUri, Settings settings)
        {
            if (settings == null)
                throw new ArgumentNullException(nameof(settings));
            if (executorUri == null)
                throw new ArgumentNullException(nameof(executorUri));
            if (assemblyPath == null)
                throw new ArgumentNullException(nameof(assemblyPath));
            if (frameworkHandle == null)
                throw new ArgumentNullException(nameof(frameworkHandle));

            this.frameworkHandle = frameworkHandle;
            this.assemblyPath = assemblyPath;
            this.executorUri = executorUri;
            this.settings = settings;
        }
        public void RunAssemblySpecifications(string assemblyPath,
                                              IEnumerable<VisualStudioTestIdentifier> specifications,
                                              Settings settings,
                                              Uri executorUri,
                                              IFrameworkHandle frameworkHandle)
        {
            assemblyPath = Path.GetFullPath(assemblyPath);

            using (var scope = new IsolatedAppDomainExecutionScope<AppDomainExecutor>(assemblyPath))
            {
                VSProxyAssemblySpecificationRunListener listener = new VSProxyAssemblySpecificationRunListener(assemblyPath, frameworkHandle, executorUri, settings);

                AppDomainExecutor executor = scope.CreateInstance();

                executor.RunTestsInAssembly(assemblyPath, specifications, listener);
            }
        }
        public static Settings Parse(string xml)
        {
            Settings config = new Settings();

            XElement mspecConfig = null;
            try {
                mspecConfig = XDocument.Parse(xml).XPathSelectElement("RunSettings/MSpec");
            } catch { }

            if (mspecConfig == null)
                return config;

            config.DisableFullTestNameInOutput = "true".Equals(mspecConfig.Element("DisableFullTestNameInOutput")?.Value ?? "false", StringComparison.InvariantCultureIgnoreCase);
            config.DisableFullTestNameInIDE = "true".Equals(mspecConfig.Element("DisableFullTestNameInIDE")?.Value ?? "false", StringComparison.InvariantCultureIgnoreCase);

            return config;
        }