/// <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); }
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()); } } }
/// <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); }
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; } }
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; } } }
public void CreateFeature(string featureTitle, string description = "") { var feature = Extent.CreateTest <Feature>(featureTitle, description); Features.Add(featureTitle, feature); }
public static void AddFeatureInfo(string title) { Feature = Extent.CreateTest <AventStack.ExtentReports.Gherkin.Model.Feature>(title); }
public void CreateTest(string testName) { Test = Extent.CreateTest(testName); }
public void TestInitialize() { ExtentTest = Extent.CreateTest(TestContext.CurrentContext.Test.ClassName + "." + TestContext.CurrentContext.Test.MethodName); }
public void BeforeTest() { Test = Extent.CreateTest(TestContext.CurrentContext.Test.Name); Test.Log(Status.Info, $"Test {TestContext.CurrentContext.Test.FullName} started."); }