Example #1
0
        //private readonly int degreeOfParallelism;

        /// <summary>
        /// Specifies the maximum number of concurrent threads to use when tests are run in parallel.
        /// </summary>
        /// <param name="degreeOfParallelism">The degree of parallelism.</param>
        /// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="degreeOfParallelism"/> is less than 1.</exception>
        //public ParallelismLimitAttribute(int degreeOfParallelism)
        //{
        //    if (degreeOfParallelism < 1)
        //        throw new ArgumentOutOfRangeException("degreeOfParallelism", "Degree of parallelism must be at least 1.");

        //    this.degreeOfParallelism = degreeOfParallelism;
        //}

        // //<summary>
        // //Gets the degree of parallelism.
        // //</summary>

        //public int ParallelismLimit
        //{
        //    get { return degreeOfParallelism; }
        //}

        /// <inheritdoc />
        protected override void DecorateAssemblyTest(IPatternScope assemblyScope, IAssemblyInfo assembly)
        {
            assemblyScope.TestBuilder.TestActions.InitializeTestChain.After(state =>
            {
                FrameGlobals.Init();
                TestAssemblyExecutionParameters.DegreeOfParallelism = FrameGlobals.parallelismCount;
            });
        }
Example #2
0
        public void BeforeAll()
        {
            HTMLReportCleaner htmlCleaner = new HTMLReportCleaner();

            htmlCleaner.TSsetUp();

            string fixtureName = this.GetType().Name.ToString();

            FrameGlobals.Init();
            FrameGlobals.isNewFixture = true;
            HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
            fileReport            = FileReader.GetFilePath(FilePath.Report);
            FrameGlobals.htmlPath = fileReport;
            doc.Load(FileReader.GetFilePath(FilePath.Report));
            //doc.Load(FrameGlobals.htmlPath);
            HtmlNode node      = doc.GetElementbyId("list");
            HtmlNode newAnchor = HtmlNode.CreateNode("<Span><a href=\"JavaScript:showDiv('" + fixtureName + "');\" ><h2 class=\"menu-font\">" + fixtureName + "</h2></a></span><br/>");

            node.AppendChild(newAnchor);

            doc.Save(FileReader.GetFilePath(FilePath.Report));
            ReportLibrary.WriteFixtureDivToRepoert(fixtureName);
        }