Software Testing Live Project

Software Testing Live Project, Project Explanation, Writing Sanity Test cases, Writing Comprehensive Test cases, and Automating Tests using Selenium.

You can test this Software Testing Live Project Manually as well as using Selenium or UFT/QTP test tools.

Selenium Online Training with Project (by G C Reddy)

Project Admin Interface URL

Project User Interface URL


Software Testing Live Project (Theory)

1. Project Information
2. Project Overview
3. Stakeholders of the Project
4. Interface of the Project/AUT
5. Features to be tested in Admin Interface
6. Features to be tested in User Interface
7. Derive Sanity Test Scenarios for Admin Interface
8. Derive Sanity Test Scenarios for User Interface
9. Derive Comprehensive (All Possible) Test Cases for Admin Interface
10. Derive Comprehensive (All Possible) Test Cases for User Interface

1. Project Information

Domain: Ecommerce

Sub Domain: B2C (Business to Customer)

Application: Online Shopping

Application Type: Public Web Application (Internet Application)

Development Technologies: LAMP (Linux, Apache, MySQL, PHP)

2. Project Overview

i. Admin Interface/Server-side (Application Master Data (Add/Edit/Delete), and Maintenance (User management, Operations management, etc,) of the application)

ii. User Interface/Clint side: To perform specified Business operations
……………………………….

Two types of Online Shopping Applications
Type 1: Vendor develops their own online shopping portal to sell their product
Type 2: Some third party develops online shopping portal sell & buy products

Admin Interface Functional features:
• Add / Edit/Delete Manufacturer/s
• Add/Edit/delete Category/s
• Add / Edit/Delete Product/s
• Add / Edit/Delete/Set as Default Currency
• Reports

User Interface Functional features:
• View Products, Product Search, Advanced Search
• Customer Registration, Customer Login,
• Shopping Cart (Add Product/s, Update Quantity, Remove Product….)
• Checkout (Change Address, Add Comments, Payment Method, Edit Details, Order Confirmation…)

3. Stakeholders of the Project

An individual, group, or organization, who may affect, be affected by or perceive itself to be affected by a decision or activity, or outcome of a project

Project Leader
Senior Management
Project Team Members
Project Customer
Project Testers
Subcontractors, Consultants, etc…

4. Interfaces of the Project/AUT

Three Interfaces of Software Application,
i. Admin Interface
ii. User Interface
iii. Database Interface

i. Admin Interface:
http://gcreddy.com/project/admin/

Username: gcreddy
Password: Temp@2020

2. User Interface
http://gcreddy.com/project/

5. Features to be Tested in Admin Interface

i.Launch Application
ii. Login to Admin Interface of the Application
iii. Redirecting Operation from Admin to User Interface
iv. Add /Edit/Delete Manufacturer
v. Add /Edit/Delete Category
vi. Add /Edit/Delete Product
vii. Add /Edit/Delete/Set as Default Currency
viii. Reports (User, product etc…)

6. Features to be tested in user Interface

i. Launch Application
ii. View Product/s
iii. Search Products/s
iv. Advanced Search
v. Customer Registration
vi. Customer Login
vii. Buy Product/s (Login, Choose product/s, Update Quantity, Delete Product/s, Change Details, Select Payment Option, Checkout…)
viii. Track Order status…

Business Flow/s of the User Interface

i. Launch Application + View Products + Search Product/s….
ii. Launch Application + Registration + Login…
iii. Launch Application + Login + Buy product/s
iv. Launch Application + View Products + Buy Product/s + Login /Register…
v. Launch Application + Login + Buy product/s (Choose product/s, Choose Quantity, Change Details, Select Payment Option, Checkout…) Etc…

7. Derive Sanity Test Scenarios for Admin Interface

i. Launch Application
ii. Verify required elements availability in the Admin interface home page/login page
iii. Verify Admin Login with valid username and password
iv. Verify required elements availability on the Index page
v. Add Manufacturer
vi. Add Category
vii. Add Product
viii. Add Currency
Etc…

8. Derive Sanity Test Scenarios for User Interface

i. Verify the Launch of User Interface with valid url
ii. Verify required elements availability in the home page
iii. Verify Customer Registration with valid data
iv. Verify Customer Login
v. Verify Shopping Cart
vi. Verify Checkout
vii. Verify Log Off

9. Derive Comprehensive (All Possible) Test Cases for Admin Interface

i. Verify Launch Application with valid URL
ii. Verify all elements availability in the Admin interface home page/login page
iii. Verify “Redirect” functionality from Admin to User Interface before Login
iii. Verify Admin Login with valid username and Password
iv. Verify Admin Login with invalid Username and valid Password
v. Verify Admin Login with Valid Username and Invalid password
vi. Verify Admin Login with invalid Username and invalid password
vii. Verify Admin Login with Username Blank and Valid password
viii. Verify Admin Login with Valid Username and password blank
ix. Verify Admin Login with Username and Password Blank
x. Verify Admin Login Locking functionality
xi. Verify all elements available on the Index page
xii. Verify “Redirect” functionality from Admin to User Interface after Login
xiii. Add Manufacturer
xiv. Edit Manufacturer
xv. Delete Manufacturer
xvi. Add Category
xvii. Edit Category
xviii. Delete Category
xix. Add Product
xx. Edit Product
xxi. Delete Product
xxii. Move Product
xxiii. Add Currency
xxiv. Edit Currency
xxv. Delete Currency
xxvi. Set Default Currency
xxvii. Verify Customer Report
xxviii. Verify Product Report
xxix. Verify “Logoff”

10. Derive Comprehensive (All Possible) Test Cases for User Interface

i. Verify the Launch of User Interface with valid URL
ii. Verify all elements available on the home page
Verify Customer Registration with valid data
.
.
.
Verify Customer Login with valid Email Address and Password
.
.
.
Verify Shopping Cart
Verify “Shopping Cart” before selecting any product
Verify “Shopping Cart” after selecting a product
Verify “Shopping Cart” by adding multiple products
Verify “Shopping Cart” by Updating Product/s Quantity
Verify “Shopping Cart” by Removing Product/s
.
Verify Checkout before selecting any product
Verify Checkout after selecting a product and before Login
Verify Checkout after selecting a product and after Login
Verify “Chang Address” in “Checkout” Process
Verify “Add Comment
Verify “Payment Option”
Verify “Order Confirmation”
Verify “Logoff”

Software Testing Live Project Video

Project Admin Interface (Practical)

https://gcreddy.com/project/admin/login.php

Manual Test Cases:

1. Verify the Launch “Admin Interface” of the Application.

Test Steps:
i. Launch Browser
ii. Capture/Return the Page Title

Test Data:
NA

Expected:
Page Title is: “osCommerce Online Merchant Administration Tool”

Verification Point:
Compare the captured Page Title with the Expected value.

2. Verify Mandatory Elements availability in Admin interface home page

Test Steps:
i. Launch Browser
ii. Capture/Return the existence status of “create an account”, “login”, and “Shopping Cart” links

Test Data:
NA

3. Page Redirect Functionality (From Admin to User Interface) before Login

Test Steps:

i. Launch Browser
ii. Navigate to http://gcreddy.com/project/admin/login.php
iii. Click “Online CataLog” Link
iv. Capture the current URL
v. Close Browser window

Input/Test data:
NA

Expected URL:
http://gcreddy.com/project/

4. Verify Admin Login with valid data

Test Steps:

i. Launch Browser
ii. Navigate to http://gcreddy.com/project/admin/login.php…
iii. Enter Valid “Username”
iv. Enter Valid “Password”
v. Click “Login” Button
v. Capture the current URL/ return the displayed status of “Logoff” link
vi. Close the Browser window

Verification point:
Compare the captured URL with expected URL

Verify the existence of “Logoff” Link

Input/Test Data:
Username: gcreddy
Password: Temp@2020

Expected:
http://gcreddy.com/project/admin/index.php/

Availability of “Logoff” Link

Actual Result: *After Test Case Execution

Test Result: Pass/Fail (*After Test Case Execution)

Comments: Optional

5. Verify admin login with invalid data

Test Steps:

i. Launch Browser
ii. Navigate to http://gcreddy.com/project/admin/login.php…
iii. Enter Invalid “Username”
iv. Enter Invalid “Password”
v. Click “Login” Button
v. Capture the “Error Message” displays on the screen.
vi. Close the Browser window

Verification point:
Compare the captured “Error Message” with the expected value.

Expected Message:
“Error: Invalid administrator login attempt.”

Input/Test Data:
Username: abcdef
Password: Temp@0000

6. Verify Admin Login Locking Functionality

Business Rule: Admin Login will be locked for 5 minutes after 3 invalid login attempts.

Test Steps:
i. Lunch Browser
ii. Navigate to Admin Interface home/Login page (http://gcreddy.com/project/admin/login.php)
iii. Enter Username
iv. Enter Password
v. Click “Login Button

Verification Point:
Capture the Error message and compare with expected for 4 times

Expected:
1st Iteration: Error: Invalid administrator login attempt
2nd Iteration: Error: Invalid administrator login attempt
3rd Iteration: Error: Invalid administrator login attempt
4th Iteration: Error: The maximum number of login attempts has been reached. Please try again in 5 minutes.

Test Data:
Ref: input.txt

Username – Edit box- name – username
Password – Edit box- name – password
Login – Button – id – tdb1
Error Message – Text – className – messageStackError

Test Data:
Username Password
abcdefg, Temp@2020
gcreddy, Temp@0000
abcdxyz, Temp@1111
gcreddy, Temp@2020


Automating Manual Test Cases using Selenium

Automating Software Testing Live Project using Selenium WebDriver, Java, TestNG, Maven, etc,

Selenium WebDriver – Test Tool

Eclipse IDE – Writing Programs for Java, Python, PHP, etc…/Writing Test Scripts

Java – Writing Programs / Writing Test Scripts

JUnit / TestNG Testing Framework – Unit Testing for Java/System Testing with Selenium

Maven – Build Automation Tool for Java Projects/Maintenance of Selenium Test Environment

Selenium Integration with Maven

Build Automation Tool for Java Projects/Maintenance of Selenium Test Environment

Advantages of Maven Integrating with Selenium

a. Selenium Test Environment Setup
(You can add all required Software dependencies like Selenium WebDriver, TestNG etc…to Maven Project (POM XML) then it will download and add those jar file/s to your project)

b. Maintenance of Selenium Test Environment
(If any new version of Software is there, add that new version dependency to POM (Maven) then it will update your software)

c. Maintain Common configuration for all Team Members
(Configure Selenium Test Environment in a computer and share the POM XML file to all team members of the project then your team will have a common configuration.

Navigation for creating “Maven Project” in Eclipse IDE:

Launch Eclipse IDE

File Menu
New
Project
Type Maven and Select Maven Project,
Enter
Next
Next
Enter Group Id
Enter Artifact Id
Finish
* Then It will create a New Maven project

Note: “Maven” is a built-in component of Eclipse IDE

Selenium Test Cases:

public class Admin_Login {
WebDriver driver;

@BeforeMethod
public void launchBrowser() {
System.setProperty(“webdriver.chrome.driver”, “C:\\Users\\user\\Downloads\\chromedriver.exe”);
driver = new ChromeDriver();
driver.manage().window().maximize();
}

@AfterMethod
public void closeBrowser() {
driver.close();
}

@Test (priority=1)
public void verifyLaunchApp() throws InterruptedException {
driver.get(“https://gcreddy.com/project/admin/”);
Thread.sleep(2000);
String pageTitle = driver.getTitle();
Assert.assertEquals(pageTitle, “osCommerce Online Merchant Administration Tool”);
}

@Test (priority=2)
public void verifyElements() throws InterruptedException {
driver.get(“https://gcreddy.com/project/admin/”);
Thread.sleep(2000);

boolean ele1 = driver.findElement(By.name(“username”)).isDisplayed();
Assert.assertEquals(ele1, true);

boolean ele2 = driver.findElement(By.name(“password”)).isDisplayed();
Assert.assertEquals(ele2, true);

boolean ele3 = driver.findElement(By.id(“tdb1”)).isDisplayed();
Assert.assertEquals(ele3, true);
}

@Test (priority=3)
public void verifyPageRedirection() throws InterruptedException {
driver.get(“https://gcreddy.com/project/admin/”);
Thread.sleep(2000);
driver.findElement(By.linkText(“Online Catalog”)).click();
Thread.sleep(2000);
String url = driver.getCurrentUrl();

Assert.assertEquals(url, “https://gcreddy.com/project/”);
}

@Test (priority=4)
public void verifyAdminLogin() throws InterruptedException {
driver.get(“https://gcreddy.com/project/admin/”);
driver.findElement(By.name(“username”)).sendKeys(“gcreddy”);
driver.findElement(By.name(“password”)).sendKeys(“Temp@2020”);
driver.findElement(By.id(“tdb1”)).click();
Thread.sleep(2000);
String url = driver.getCurrentUrl();

Assert.assertEquals(url, “https://gcreddy.com/project/admin/index.php”);
}

@Test (priority=5)
public void verifyLogoff() throws InterruptedException {
driver.get(“https://gcreddy.com/project/admin/”);
driver.findElement(By.name(“username”)).sendKeys(“gcreddy”);
driver.findElement(By.name(“password”)).sendKeys(“Temp@2020”);
driver.findElement(By.id(“tdb1”)).click();

Assert.assertEquals(driver.getCurrentUrl(), “https://gcreddy.com/project/admin/index.php”);
Thread.sleep(3000);
driver.findElement(By.linkText(“Logoff”)).click();
Thread.sleep(3000);
Assert.assertEquals(driver.getCurrentUrl(), “https://gcreddy.com/project/admin/login.php”);
}

@Test (priority=6)
public void verifyErrorMessage() {
driver.get(“https://gcreddy.com/project/admin/”);
driver.findElement(By.name(“username”)).sendKeys(“abcdef”);
driver.findElement(By.name(“password”)).sendKeys(“Temp@0000”);
driver.findElement(By.id(“tdb1”)).click();

String errorMessage = driver.findElement(By.className(“messageStackError”)).getText();

Assert.assertTrue(errorMessage.contains(“Error: Invalid administrator login attempt.”));
}

@Test (priority=7)
public void adminLoginLocking() throws IOException, InterruptedException {
FileReader file = new FileReader(“C:\\Users\\user\\Desktop\\input.txt”);
BufferedReader br = new BufferedReader (file);
int count =0;
int iteration=0;
String line;

while ((line=br.readLine()) !=null) {
count =count+1;

if (count>1) {
String inputData[] = line.split(“, “, 2);
iteration=iteration+1;

driver.get(“https://gcreddy.com/project/admin/”);
driver.findElement(By.name(“username”)).sendKeys(inputData[0]);
driver.findElement(By.name(“password”)).sendKeys(inputData[1]);
driver.findElement(By.id(“tdb1”)).click();

String errorMessage = driver.findElement(By.className(“messageStackError”)).getText();
Thread.sleep(3000);
if (iteration<=3) {
Assert.assertTrue(errorMessage.contains(“Error: Invalid administrator login attempt.”));
}
else if (iteration>3) {
Assert.assertTrue(errorMessage.contains(“Error: The maximum number of login attempts has been reached. Please try again in 5 minutes.”));
}
br.close();
file.close();
}
}
}

}


Software Testing Live Project User Interface

https://gcreddy.com/project/

Sanity Test Scenarios for User Interfaces of gcrShop Application

i) Verify Launch User Interface of the Application
ii) Verify Mandatory Elements availability on User interface home page
iii) Verify Customer Registration
iv) Verify Customer Login
v) Verify Shopping Cart
vi) Verify Checkout Process
vii) Verify Logoff

Selenium Test Cases:

public class User_Sanity {
WebDriver driver;

@BeforeMethod
public void launchBrowser() {
System.setProperty(“webdriver.chrome.driver”, “C:\\Users\\user\\Downloads\\chromedriver.exe”);
driver = new ChromeDriver();
driver.manage().window().maximize();
}

@AfterMethod
public void closeBrowser() {
driver.close();
}

@Test (priority=1)
public void verifyLaunchApp() throws InterruptedException {
driver.get(“http://gcreddy.com/project/”);
Thread.sleep(2000);

String pageTitle = driver.getTitle();
Assert.assertEquals(“GCR Shop”, pageTitle);
}

@Test (priority=2)
public void verifyElements() throws InterruptedException {
driver.get(“http://gcreddy.com/project/”);
Thread.sleep(2000);

boolean element1 = driver.findElement(By.linkText(“create an account”)).isDisplayed();
Assert.assertEquals(element1, true);

boolean element2 = driver.findElement(By.linkText(“login”)).isDisplayed();
Assert.assertEquals(element2, true);
}

@Test (priority=3)
public void verifyCustomerReg() throws InterruptedException {
driver.get(“https://gcreddy.com/project/create_account.php”);
driver.findElement(By.xpath(“//*[@id=\”bodyContent\”]/form/div/div[2]/table/tbody/tr[1]/td[2]/input[2]”)).click();
driver.findElement(By.name(“firstname”)).sendKeys(“abcd”);
driver.findElement(By.name(“lastname”)).sendKeys(“xyz”);
driver.findElement(By.id(“dob”)).sendKeys(“10/10/1990”);

driver.findElement(By.name(“email_address”)).sendKeys(“decseleniuma2020@gmail.com”);
driver.findElement(By.name(“street_address”)).sendKeys(“abcd sdf”);
driver.findElement(By.name(“postcode”)).sendKeys(“500072”);
driver.findElement(By.name(“city”)).sendKeys(“Hyderabad”);
driver.findElement(By.name(“state”)).sendKeys(“Telangana”);

Select dropDown = new Select (driver.findElement(By.name(“country”)));
dropDown.selectByVisibleText(“India”);

driver.findElement(By.name(“telephone”)).sendKeys(“9876765654”);

driver.findElement(By.name(“password”)).sendKeys(“abcd321”);
driver.findElement(By.name(“confirmation”)).sendKeys(“abcd321”);
driver.findElement(By.id(“tdb4”)).click();

driver.findElement(By.name(“password”)).sendKeys(“abcd321”);
driver.findElement(By.name(“confirmation”)).sendKeys(“abcd321”);
driver.findElement(By.id(“tdb4”)).click();
Thread.sleep(3000);

String message = driver.findElement(By.tagName(“h1”)).getText();
//System.out.println(message);

Assert.assertEquals(message, “Your Account Has Been Created!”);
}

@Test (priority=4)
public void verifyLogin() {
driver.get(“https://gcreddy.com/project/login.php”);
driver.findElement(By.name(“email_address”)).sendKeys(“decseleniuma2020@gmail.com”);
driver.findElement(By.name(“password”)).sendKeys(“abcd321”);
driver.findElement(By.id(“tdb1”)).click();

boolean elementExists = driver.findElement(By.linkText(“Log Off”)).isDisplayed();
Assert.assertEquals(elementExists, true);
}

@Test (priority=5)
public void verifyShoppingCart() {
driver.get(“https://gcreddy.com/project/index.php”);
driver.findElement(By.xpath(“//*[@id=\”columnRight\”]/div/div[1]/a”)).click();
String message = driver.findElement(By.xpath(“//*[@id=\”bodyContent\”]/div/div”)).getText();
//System.out.println(message);

Assert.assertTrue(message.contains(“Your Shopping Cart is empty!”));
}

@Test (priority=6)
public void verifyCheckout() throws InterruptedException {
driver.get(“https://gcreddy.com/project/index.php”);
driver.findElement(By.linkText(“login”)).click();
driver.findElement(By.name(“email_address”)).sendKeys(“decselenium2020@gmail.com”);
driver.findElement(By.name(“password”)).sendKeys(“abcd321”);
driver.findElement(By.id(“tdb1”)).click();

driver.findElement(By.xpath(“//*[@id=\”bodyContent\”]/div/div[2]/table/tbody/tr/td[3]/a[1]/img”)).click();
driver.findElement(By.id(“tdb5”)).click();
Thread.sleep(2000);
driver.findElement(By.id(“tdb6”)).click();
Thread.sleep(2000);
driver.findElement(By.id(“tdb6”)).click();
Thread.sleep(2000);
driver.findElement(By.id(“tdb6”)).click();
Thread.sleep(2000);
driver.findElement(By.id(“tdb5”)).click();
}

}

Software Testing Live Project


Manual Testing Tutorial
Java Tutorial
Python Tutorial
SQL Tutorial
Selenium, Java, and Testing Videos
Follow me on social media: