mirror of
https://dev.azure.com/Foster-X/CMP329%20CW2/_git/CMP329%20CW2
synced 2025-07-27 04:23:32 +00:00
Merge branch 'master' of ssh.dev.azure.com:v3/Foster-X/CMP329%20CW2/CMP329%20CW2
This commit is contained in:
commit
e9f0176e4c
3 changed files with 18 additions and 2 deletions
4
src/csv/reports/test-report-20250407-123200.csv
Normal file
4
src/csv/reports/test-report-20250407-123200.csv
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Role,Username,Step,Result
|
||||||
|
N/A,testuser,Login,PASS
|
||||||
|
N/A,subscriber,Login,PASS
|
||||||
|
N/A,fakename,Login,FAIL
|
|
12
src/csv/reports/test-report-20250408-142058.csv
Normal file
12
src/csv/reports/test-report-20250408-142058.csv
Normal file
|
@ -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)
|
Can't render this file because it has a wrong number of fields in line 12.
|
|
@ -33,7 +33,7 @@ public class TestPoster {
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
public static void initReport() {
|
public static void initReport() {
|
||||||
CsvBuilder.createTestReportFile();
|
CsvBuilder.createTestReportFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
|
@ -50,7 +50,7 @@ public class TestPoster {
|
||||||
boolean loginAllowed = (!role.equals("unauthorised"));
|
boolean loginAllowed = (!role.equals("unauthorised"));
|
||||||
WebElement username = driver.findElement(By.id(USERNAME_BOX_ID));
|
WebElement username = driver.findElement(By.id(USERNAME_BOX_ID));
|
||||||
WebElement password = driver.findElement(By.id(PASSWORD_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);
|
username.sendKeys(usernameText);
|
||||||
password.sendKeys(passwordText);
|
password.sendKeys(passwordText);
|
||||||
|
|
Loading…
Add table
Reference in a new issue