Пример #1
0
        /// <summary>

        /// Starts a tests set

        /// </summary>

        /// <param name="suiteName">the name of the set</param>

        public static void StartTestsSuite(string suiteName)

        {
            Test = null;

            SubTest = null;

            testsSuite = Extent.CreateTest(suiteName);
        }
Пример #2
0
 public static void AddTestMethodMetadataToReport(TestContext testContext)
 {
     CurrentTest = Extent.CreateTest(testContext.Test.Name);
     if (testContext.Test.Properties.ContainsKey("Category"))
     {
         var categories = testContext.Test.Properties["Category"];
         foreach (var category in categories)
         {
             CurrentTest.AssignCategory(category.ToString());
         }
     }
 }
Пример #3
0
        /// <summary>

        /// Start a new test for the report, if there is no open suit the suit name will be as the test name

        /// </summary>

        /// <param name="testName">the name of the new test</param>

        public static void StartTest(string testName)

        {
            SubTest = null;

            if (testsSuite == null)
            {
                Test = Extent.CreateTest(testName);
            }

            //else

            Test = TestsSuite.CreateNode(testName);
        }
Пример #4
0
 public static void AddTestMethodMetadataToReport(TestContext testContext, List <string> testCategories)
 {
     CurrentTest = Extent.CreateTest(testContext.TestName);
     if (testCategories.Any())
     {
         foreach (var category in testCategories)
         {
             CurrentTest.AssignCategory(category);
         }
     }
     else
     {
         return;
     }
 }
Пример #5
0
        public void BeforeMethod()
        {
            test = Extent.CreateTest(TestContext.CurrentContext.Test.Name);
            // add other browsers if needed
            string browser = TestContext.Parameters.Get("browser", "chrome");

            switch (browser)
            {
            default:
            case "chrome":
            {
                StartChrome();
                break;
            }
            }
        }
Пример #6
0
        public void CreateFeature(string featureTitle, string description = "")
        {
            var feature = Extent.CreateTest <Feature>(featureTitle, description);

            Features.Add(featureTitle, feature);
        }
Пример #7
0
 public static void AddFeatureInfo(string title)
 {
     Feature = Extent.CreateTest <AventStack.ExtentReports.Gherkin.Model.Feature>(title);
 }
Пример #8
0
 public void CreateTest(string testName)
 {
     Test = Extent.CreateTest(testName);
 }
Пример #9
0
 public void TestInitialize()
 {
     ExtentTest = Extent.CreateTest(TestContext.CurrentContext.Test.ClassName + "." +
                                    TestContext.CurrentContext.Test.MethodName);
 }
Пример #10
0
 public void BeforeTest()
 {
     Test = Extent.CreateTest(TestContext.CurrentContext.Test.Name);
     Test.Log(Status.Info, $"Test {TestContext.CurrentContext.Test.FullName} started.");
 }