Exemplo n.º 1
0
        public void EndTest(ExtentTest Test)
        {
            Test.GetTest().Ended = true;

            AddTest(Test.GetTest());

            RemoveChildTests();
        }
Exemplo n.º 2
0
        public ExtentTest StartTest(string Name, string Description = "")
        {
            if (TestList == null)
            {
                TestList = new List<ExtentTest>();
            }

            var test = new ExtentTest(Name, Description);
            TestList.Add(test);

            return test;
        }
Exemplo n.º 3
0
        public ExtentTest AppendChild(ExtentTest Node)
        {
            var node = Node.GetTest();

            node.ChildNode = true;
            node.Ended = true;

            node.TrackLastRunStatus();

            node.CategoryList.ForEach(c => AssignCategory(c.Name));
            node.AuthorList.ForEach(a => AssignAuthor(a.Name));

            _test.NodeList.Add(node);
            _test.ContainsChildNodes = true;

            return this;
        }
Exemplo n.º 4
0
        public void EndTest(ExtentTest Test)
        {
            Test.GetTest().Ended = true;

            AddTest(Test.GetTest());
        }
Exemplo n.º 5
0
        /// <summary>
        /// Calling startTest() generates a toggle for the test in the HTML file and adds all 
        /// log events under this level. This is a required step and without calling this method 
        /// the toggle will not be created for the test and log will not be added.
        /// </summary>
        /// 
        /// <param name="Name">Name of the test</param>
        /// <param name="Description">A short description of the test</param>
        /// <returns>An ExtentTest object</returns>
        public ExtentTest StartTest(string Name, string Description = "")
        {
            if (TestList == null)
            {
                TestList = new List<ExtentTest>();
            }

            var test = new ExtentTest(Name, Description);

            if (DisplayOrder == DisplayOrder.OldestFirst)
            {
                TestList.Insert(0, test);
            }
            else
            {
                TestList.Add(test);
            }

            return test;
        }
Exemplo n.º 6
0
        /// <summary>
        /// Ends the test. Calling this method will ensure the test gets safely 
        /// added to the report.
        /// </summary>
        /// <param name="Test">ExtentTest object</param>
        public void EndTest(ExtentTest Test)
        {
            Test.GetTest().HasEnded = true;

            reportInstance.AddTest(Test.GetTest());
        }