diff --git a/src/csv/reports/test-report-20250407-123200.csv b/src/csv/reports/test-report-20250407-123200.csv new file mode 100644 index 0000000..b86ecf6 --- /dev/null +++ b/src/csv/reports/test-report-20250407-123200.csv @@ -0,0 +1,4 @@ +Role,Username,Step,Result +N/A,testuser,Login,PASS +N/A,subscriber,Login,PASS +N/A,fakename,Login,FAIL diff --git a/src/csv/reports/test-report-20250408-142058.csv b/src/csv/reports/test-report-20250408-142058.csv new file mode 100644 index 0000000..10437f3 --- /dev/null +++ b/src/csv/reports/test-report-20250408-142058.csv @@ -0,0 +1,12 @@ +Role,Username,Step,Result +author,testuser,Login,PASS (Logged in succesfully) +author,testuser,Post Access,PASS +author,testuser,Post Creation,PASS +author,testuser,Post Visible,PASS +author,testuser,Post Deleted,PASS +subscriber,subscriber,Login,PASS (Logged in succesfully) +subscriber,subscriber,Post Access,PASS +subscriber,subscriber,Post Creation,SKIPPED (Not permitted) +subscriber,subscriber,Post Visible,SKIPPED +subscriber,subscriber,Post Deleted,SKIPPED +unauthorised,fakename,Login,PASS (Login failed, as expected) diff --git a/src/test/TestPoster.java b/src/test/TestPoster.java index ed692ac..516f565 100644 --- a/src/test/TestPoster.java +++ b/src/test/TestPoster.java @@ -33,7 +33,7 @@ public class TestPoster { @BeforeAll public static void initReport() { - CsvBuilder.createTestReportFile(); + CsvBuilder.createTestReportFile(); } @ParameterizedTest @@ -50,7 +50,7 @@ public class TestPoster { boolean loginAllowed = (!role.equals("unauthorised")); WebElement username = driver.findElement(By.id(USERNAME_BOX_ID)); WebElement password = driver.findElement(By.id(PASSWORD_BOX_ID)); - WebElement login = driver.findElement(By.id(LOGIN_BUTTON_ID)); + WebElement login= driver.findElement(By.id(LOGIN_BUTTON_ID)); username.sendKeys(usernameText); password.sendKeys(passwordText);