// creating report obj
TrganHtmlReport report = new("reports/TestBasedReport.html");
// creating Test 1
TrganTest test1 = report.CreateTest(testName: "Login in with valid credentials", categories: ["Login"]);
DoingOperations();
test1.AddStep(Status.PASS, "Navigate to app");
DoingOperations();
test1.AddStep(Status.PASS, GherkinKeyword.When, "Enter valid credentials");
DoingOperations();
test1.AddStep(Status.PASS, GherkinKeyword.Then, "Land on main page");
// creating Test 2
TrganTest test2 = report.CreateTest(testName: "Login in with invalid credentials", categories: ["Login"]);
DoingOperations();
test2.AddStep(Status.PASS, GherkinKeyword.Given, "Navigate to app");
DoingOperations();
test2.AddStep(Status.PASS, GherkinKeyword.When, "Enter invalid credentials");
DoingOperations();
test2.AddStep(Status.PASS, GherkinKeyword.Then, "Failed to land on main page");
// creating Test 3
TrganTest test3 = report.CreateTest(testName: "Login in with valid username", categories: ["Login"]);
DoingOperations();
test3.AddStep(Status.PASS, GherkinKeyword.Given, "Navigate to app");
DoingOperations();
test3.AddStep(Status.PASS, GherkinKeyword.When, "Enter valid username and invalid password");
DoingOperations();
test3.AddStep(Status.PASS, GherkinKeyword.Then, "Failed to land on main page");
// generating report
report.Generate();