Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
66 changes: 66 additions & 0 deletions generated_tests/playwright_tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Playwright Test Suite

## RoostGpt Generated playwright test

This project contains Playwright-based automated tests located in the `playwright_tests` directory.

## 📁 Directory Structure

```bash
playwright_tests/
├── scenarios/
├── tests/
├── package.json
├── playwright.config.js
```

## 🧩 Prerequisites

Make sure you have the following installed:

- [Node.js](https://nodejs.org/) (version 18 or higher recommended)
- npm (comes with Node.js)

## 📦 Setup

1. Navigate to the Playwright tests directory:

2. Install dependencies:

```bash
npm install
```

## 🚀 Running Tests

To execute all Playwright tests:

```bash
npx playwright test
```

You can also run a specific test file:

```bash
npx playwright test tests/example.spec.js
```

> Replace `example.spec.js` with the actual test file you want to run.

## 📂 Test Reports

After the tests run, Playwright will generate a report. To view the report:

```bash
npx playwright show-report
```

## ⚙️ Configuration

Test configuration is defined in `playwright.config.js`.

You can modify settings like test directory, timeout etc., in this file.

## 📘 More Info

For detailed Playwright documentation, visit: [https://playwright.dev](https://playwright.dev)

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Feature: Customer Login to ParaBank E2E Workflow

As a ParaBank customer
I want to log in to my account
So that I can access my banking information and perform transactions

@login @e2e @critical
Scenario: Successful customer login with valid credentials
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
Then the page title should contain "ParaBank"
And the login form should be visible

When I fill in the "Username" field with "john"
Then the "Username" field should contain "john"

When I fill in the "Password" field with "demo"
Then the password field should contain masked characters

When I click the "Log In" button
Then I should wait for page navigation to complete
And I should be redirected to the account overview page
And the URL should contain "overview.htm"

When the page has fully loaded
Then I should see a welcome message containing "john"
And the account summary section should be visible
And at least one account should be listed in the account summary
And the authenticated navigation menu should be displayed
And the "Transfer Funds" option should be available in the navigation menu
And the "Bill Pay" option should be available in the navigation menu
And the "Log Out" option should be available

@login @negative @security
Scenario: Failed login with incorrect password
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
Then the login form should be visible

When I fill in the "Username" field with "john"
And I fill in the "Password" field with "wrongpassword"
And I click the "Log In" button

Then I should remain on the login page
And I should see an error message containing "The username and password could not be verified"
And the login form should still be visible

@login @negative @security
Scenario: Failed login with non-existent username
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
Then the login form should be visible

When I fill in the "Username" field with "nonexistentuser123"
And I fill in the "Password" field with "demo"
And I click the "Log In" button

Then I should remain on the login page
And I should see an error message containing "The username and password could not be verified"
And the login form should still be visible

@login @usability
Scenario: Validate empty field validation for login form
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
Then the login form should be visible

When I click the "Log In" button without entering credentials

Then I should remain on the login page
And I should see an error message related to missing credentials
And the login form should still be visible

@login @navigation @browser
Scenario: Browser back button after successful login maintains authenticated state
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
Then the login form should be visible

When I fill in the "Username" field with "john"
And I fill in the "Password" field with "demo"
And I click the "Log In" button

Then I should be redirected to the account overview page
And the URL should contain "overview.htm"
And the welcome message should be displayed

When I navigate to the "Bill Pay" page
Then the URL should contain "billpay.htm"

When I click the browser back button
Then I should be redirected to the account overview page
And I should remain authenticated
And the welcome message should still be displayed

@login @security @session
Scenario: Customer logout terminates user session
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
Then the login form should be visible

When I fill in the "Username" field with "john"
And I fill in the "Password" field with "demo"
And I click the "Log In" button

Then I should be redirected to the account overview page
And I should be authenticated

When I click the "Log Out" link
Then I should be redirected back to the homepage
And the URL should contain "index.htm"
And the login form should be visible
And the welcome message should not be displayed
105 changes: 105 additions & 0 deletions generated_tests/playwright_tests/scenarios/features/Scenario_4.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Feature: ParaBank User Authentication and Account Management System

This feature covers the core authentication functionality of the ParaBank website, allowing users to securely log in, manage their accounts, and perform banking operations.

## Background:
Given I am on the homepage 'https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC'

## Scenario: User logs in to access their account
When I enter 'john' in the 'Username' field in the login panel
And I enter 'demo' in the 'Password' field in the login panel
And I click the 'Log In' button in the login panel
Then I should see the 'Accounts Overview' page
And I should see the welcome message containing 'Welcome John Smith'
And I should see the 'Log Out' link in the top menu
And I should see a list of accounts in the accounts table

## Scenario: User registers for a new account
When I click the 'Register' link in the login panel
Then I should be on the registration page
And I should see the 'Signing up is easy!' header
When I enter 'John' in the 'First Name:' field
And I enter 'Doe' in the 'Last Name:' field
And I enter '123 Main St' in the 'Address:' field
And I enter 'Anytown' in the 'City:' field
And I enter 'CA' in the 'State:' field
And I enter '12345' in the 'Zip Code:' field
And I enter '555-123-4567' in the 'Phone #:' field
And I enter '123-45-6789' in the 'SSN:' field
And I enter 'jdoe2023' in the 'Username:' field
And I enter 'SecurePass123' in the 'Password:' field
And I enter 'SecurePass123' in the 'Confirm:' field
And I click the 'Register' button
Then I should see the confirmation message 'Your account was created successfully. You are now logged in.'
And I should be redirected to the accounts overview page

## Scenario: User opens a new account
When I enter 'john' in the 'Username' field in the login panel
And I enter 'demo' in the 'Password' field in the login panel
And I click the 'Log In' button in the login panel
Then I should see the 'Accounts Overview' page
When I click the 'Open New Account' link in the left menu
Then I should be on the 'Open New Account' page
And I should see the 'Open New Account' header
When I select 'SAVINGS' from the 'What type of Account would you like to open?' dropdown
And I select the first available account from the 'Please choose from which account you would like to make the initial deposit.' dropdown
And I click the 'Open New Account' button
Then I should see the 'Account Opened!' confirmation message
And I should see a new account number displayed
And I should see the 'Your new account number:' text

## Scenario: User transfers funds between accounts
When I enter 'john' in the 'Username' field in the login panel
And I enter 'demo' in the 'Password' field in the login panel
And I click the 'Log In' button in the login panel
Then I should see the 'Accounts Overview' page
When I click the 'Transfer Funds' link in the left menu
Then I should be on the 'Transfer Funds' page
And I should see the 'Transfer Funds' header
When I enter '100' in the 'Amount:' field
And I select the first account from the 'From account #:' dropdown
And I select the second account from the 'To account #:' dropdown
And I click the 'Transfer' button
Then I should see the 'Transfer Complete!' message
And I should see the confirmation text containing the amount '$100.00'
And I should see the 'from account' and 'to account' numbers displayed

## Scenario: User checks account transaction history
When I enter 'john' in the 'Username' field in the login panel
And I enter 'demo' in the 'Password' field in the login panel
And I click the 'Log In' button in the login panel
Then I should see the 'Accounts Overview' page
When I click on the first account number link in the accounts table
Then I should be on the 'Account Details' page
And I should see the 'Account Details' header
And I should see the account number displayed
And I should see the account type displayed
And I should see the account balance displayed
And I should see the 'Transaction History' section
And I should see a table containing transaction details including 'Date', 'Description', and 'Amount' columns

## Scenario: User updates their contact information
When I enter 'john' in the 'Username' field in the login panel
And I enter 'demo' in the 'Password' field in the login panel
And I click the 'Log In' button in the login panel
Then I should see the 'Accounts Overview' page
When I click the 'Update Contact Info' link in the left menu
Then I should be on the 'Update Profile' page
And I should see the 'Update Profile' header
When I enter '456 New Street' in the 'Address:' field
And I enter 'New City' in the 'City:' field
And I enter 'NY' in the 'State:' field
And I enter '54321' in the 'Zip Code:' field
And I enter '555-987-6543' in the 'Phone #:' field
And I click the 'Update Profile' button
Then I should see the confirmation message 'Your profile has been updated.'

## Scenario: User logs out of their account
When I enter 'john' in the 'Username' field in the login panel
And I enter 'demo' in the 'Password' field in the login panel
And I click the 'Log In' button in the login panel
Then I should see the 'Accounts Overview' page
When I click the 'Log Out' link in the top menu
Then I should be redirected to the homepage
And I should see the login panel with 'Username' and 'Password' fields
And I should see the 'Customer Login' header in the login panel
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Feature: ParaBank Authentication
# As a ParaBank user
# I want to be able to log in to my account
# So that I can access my banking information and services

@authentication @login @smoke
Scenario: Successful login with valid credentials
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
Then the page title should be "ParaBank | Welcome | Online Banking"
When I enter "john_doe" into the username field
And I enter "secure123" into the password field
And I click the "LOG IN" button
Then I should be redirected to the accounts overview page
And the URL should contain "overview.htm"
And I should see the welcome message with my username
And I should see my account information displayed

@authentication @login @negative
Scenario Outline: Login with invalid credentials
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
When I enter "<username>" into the username field
And I enter "<password>" into the password field
And I click the "LOG IN" button
Then I should remain on the login page
And I should see the error message "The username and password could not be verified."

Examples:
| username | password |
| john_doe | wrongpass |
| invalid | secure123 |
| invalid | wrongpass |
| | secure123 |
| john_doe | |

@authentication @login @validation
Scenario: Empty login form submission
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
When I click the "LOG IN" button without entering any credentials
Then I should remain on the login page
And I should see the error message "Please enter a username and password."

@authentication @login @security
Scenario: Login with SQL injection attempt
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
When I enter "' OR 1=1 --" into the username field
And I enter "password" into the password field
And I click the "LOG IN" button
Then I should remain on the login page
And I should see the error message indicating invalid credentials

@authentication @logout
Scenario: Successful logout after login
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
When I enter "john_doe" into the username field
And I enter "secure123" into the password field
And I click the "LOG IN" button
Then I should be redirected to the accounts overview page
When I click the "Log Out" link
Then I should be redirected to the login page
And I should see the logout success message
And I should not see any user-specific information
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Feature: Login Functionality - Authentication with Invalid Credentials
# This feature validates that the system appropriately rejects login attempts with invalid credentials
# and provides proper error messages to the user

@authentication
@negative_testing
@login
Scenario: Login with invalid credentials
Given I am on the homepage "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
Then I should see the page title "ParaBank | Welcome | Online Banking"
When I enter "x_username" in the username field
And I enter "INVALID_PASSWORD" in the password field
And I click the "LOG IN" button
Then I should remain on the page "https://parabank.parasoft.com/parabank/index.htm?ConnType=JDBC"
And I should see an error message indicating invalid credentials
And the login form should still be visible
And the username field should still contain "x_username"
And the password field should be empty
Loading