Software Testing Project
Software Testing Project to practice Manual Testing, automated testing using Selenium or UFT. Software Test Requirements, Software Test Scenarios, Software Test Cases, Software Test Execution, and Test Life Cycle Closure.
Software Testing Live Project
Software Testing Live Project URLs for Practicing, You can use Manual Testing, or Automated Testing for Testing this Project.
Software Testing point of view, we have three interfaces for any Software Application, Admin Interface, User Interface, and Database Interface.
Software Testing Project Admin Interface URL
(Server side Interface)
(The admin interface is project’s primary control panel, once logged in, user can use the admin interface to set up and configure a project, manage its structure and content, install extensions, and perform other tasks.)
Username: gcreddy
Password:Temp@2020
Test Cases for Automation:
Test Case 1: Verify Admin Login Functionality in gcrShop application Admin interface
Test Steps:
i) Launch the Browser
ii) Navigate to gcrShop Admin Interface (“https://gcreddy.com/project/admin/login.php”)
iii) Enter “Username”
iv) Enter “Password”
v) Click “Login Button
Verification Point/s:
Capture the current URL after Login and compare with expected
//or
Verify the existence of “Log Off” Link
Input / Test Data:
Username: gcreddy
Password: Temp@2020
Expected Result:
“https://gcreddy.com/project/admin/index.php”
Actual Result: * After Execution
Test Result: Pass / Fail (* After Execution)
Comments: Optional
Test Case 2: Verify “Redirect” Functionality from Admin to User Interface in gcrShop application
Test Steps:
i) Launch the Browser
ii) Navigate to gcrShop Admin Interface (“https://gcreddy.com/project/admin/login.php”)
iii) Click “Online Catalog” Link
Verification Point
Capture the current URL and compare with expected
Expected:
“https://gcreddy.com/project/”
Test Data:
NA
Test Case 3: Verify Admin Login, Or Error Message in Login Functionality in gcrshop application
Test Steps:
i) Launch the Browser
ii) Navigate to (Load) gcrshop admin interface login page /home page (“https://gcreddy.com/project/admin/login.php”)
iii) Enter “Username”
iv) Enter “Password”
v) Click “Login” Button
Verification Points
i) Capture the current URL after Login and compare with expected
ii) Capture the “Error Message” if login fails and compare with expected
Expected Result:
“https://gcreddy.com/project/admin/index.php”
Error: Invalid administrator login attempt.
Input / Test Data:
i) Test Data for Positive Scenario
a) Username: gcreddy
b) Password: admin@123
ii) Test Data for Negative Scenario 1:
a) Username: abcdef
b) Password: Temp@2020
iii) Test Data for Negative Scenario 2:
a) Username: gcreddy
b) Password: abcde@321
iv) Test Data for Negative Scenario 3:
a) Username: abcdef
b) Password: abcde@321
v) Test Data for Negative Scenario 4:
a) Username: gcreddy
b) Password:
vi) Test Data for Negative Scenario 5:
a) Username:
b) Password: Temp@2020
vii) Test Data for Negative Scenario 5:
a) Username:
b) Password:
Test Case 4: Write a Test case for Admin Login Locking Functionality in gcr Shop application admin interface.
(Business Rule: Admin Login will be locked for 5 minutes after 3 failed login attempts)
Test Steps:
i) Launch the Browser
ii) Navigate to (Load) gcrshop admin interface login page /home page (“https://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.
Software Testing Project User Interface URL
(Client-side Interface)
(Visual part of computer application, through which a user interacts with a computer or a software. It determines how commands are given to the computer or the program and how information is displayed on the screen.)
Note: In Client-side Interface of this application, guest use can create (register with site) login and Login to the application.
Test Cases for Automation:
Test Case 1: Customer Registration in gcrShop application User Interface
Test Steps:
i) Launch Browser
ii. Navigate to Customer Registration Page in gcrShop application User Interface (https://gcreddy.com/project/create_account.php)
iii) Enter all mandatory fields
iv) Click “Continue” Button
Verification Point:
Capture the Conformation message and compare with expected message
Expected result:
Your Account Has Been Created!
Test Case 2: Verify Customer Login in gcrShop User Interface
Test Steps:
i) Launch Browser
ii) Navigate to gcrShop User Interface Login Page (https://gcreddy.com/project/login.php)
iii) Enter E-Mail Address
iv) Enter Password
v) Click “Sign In” Button
Input Data/Test Data:
E-mail Address: meghala1234S@gmail.com
Password: xyz4321
Verification Point:
Verify the Existence of “Log Off” Link…
Test Case 3: Verify Status of the “Shopping cart” in User Interface of gcrSgop application
Test Steps:
i. Launch Browser
ii. Navigate to User interface of the application (https://gcreddy.com/project/)
iii. Click “Shopping Cart” link
iv. Capture the Message
Input / Test Data:
NA
Verification Point:
Compare the captured message with Expected.
Expected:
Your Shopping Cart is empty!
Project Information
Project Domain: Ecommerce
Sub-Domain: B2C (Business to Customer)
Application: Online Shopping Portal
Application Development Environment: LAMP (Linux, Apache, MySQL and PHP)
Production Environment: Internet (Public Web Application)
Test Environment: Intranet
Test Type: Functional Testing
Note: Use this sample project for practicing Functional Testing.
Software Test Method: Manual Testing / Automated Testing (using Selenium)
Note: This Project for practice, so You can use Manual Testing or Automated Testing
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: Perform specified Business operations
Admin Interface:
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
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…)
Stakeholders of the Project
An individual, group, or organization, who may effect, 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…
Interfaces of the Project/AUT
Three Interfaces of Software Application,
i) Admin Interface
ii) User Interface
iii) Database Interface
i) Admin Interface:
“https://gcreddy.com/project/admin/login.php”
Username: gcreddy
Password: Temp@2020
2) User Interface
“https://gcreddy.com/project/”
Sanity Test Scenarios for Admin Interface
(https://gcreddy.com/project/admin/login.php)
1) Launch Application with valid URL
2) Verify Mandatory Elements availability in the Admin Interface home page/Login page
3) Verify Admin Login with valid Username and valid password
4) Verify Mandatory Elements availability in the Admin Interface index page
5) Add Category
6) Add Manufacturer
7) Add Product
8) Add Currency
9) Verify a Report
10) Logoff
Sanity Test Scenarios for User Interface
(https://gcreddy.com/project/)
1) Verify Launch Application of the User Interface
2) Verify Mandatory Elements availability in the User Interface home page
3) Verify Customer Registration with valid data
4) Verify Customer Login with valid data
5) Verify Shopping Cart (Initial State, Add a Product, Update Quantity, and Remove a Product)
6) Verify Checkout process
7) Logoff & Close the Application
Comprehensive (All Possible) Test Cases for Admin Interface
(https://gcreddy.com/project/admin/login.php)
1) Launch Application with valid URL
2) Verify Mandatory Elements availability in the Admin Interface home page/Login page
3) Verify “Redirect” functionality from Admin to User Interface before Login
4) Admin user Login with valid Username and Password (Valid Input) – Positive Test Scenario
5) Admin user Login with Invalid Username and Valid Password (Invalid Input) – Negative Test Scenario
6) Admin user Login with Valid Username and Invalid Password (Invalid Input) – Negative Test Scenario
7) Admin user Login with Invalid Username and Invalid Password (Invalid Input) – Negative Test Scenario
8) Admin user Login with Blank Username and Valid Password (Invalid Input) – Negative Test Scenario
9) Admin user Login with Valid Username and Blank Password (Invalid Input) – Negative Test Scenario
10) Admin user Login with Blank Username and Blank Password (Invalid Input) – Negative Test Scenario
11) Verify Admin Logon Locking Functionality
12) Verify Mandatory Elements availability in the Admin Interface Index page
13) Verify “Redirect” functionality from Admin to User Interface after Login
14) Verify Insert Manufacturer
15) Verify Edit Manufacturer
16) Verify Delete Manufacturer
17) Verify New Category
18) Verify Edit Category
19) Verify Delete Category
20) Verify New Product
21) Verify Edit Product
22) Verify Delete Product
23) Verify Move Product
24) Verify New Currency
25) Verify Edit Currency
26) Verify Delete Currency
27) Verify Set as Default Currency
28) Verify Product Purchased Report
29) Verify Product Viewed Report
30) Verify Customer order Report
31) Verify Logoff
Comprehensive (All Possible) Test Cases for User Interface
(https://gcreddy.com/project/)
1) Verify Launch Application of the User Interface
2) Verify Mandatory Elements availability in the User Interface home page
3) Verify Customer Registration with valid data for all mandatory fields
4) Verify Customer Registration with valid data for some mandatory fields, but all optional fields
5) Verify Customer Registration with valid data for all mandatory fields, except DOB (Invalid)
6) Verify Customer Registration with valid data for all mandatory fields, except E-Mail Address (Invalid)
.
Verify Customer Login with Valid Email Address and Password
Verify Customer Login with Inlaid Email Address and Valid Password
Verify Customer Login with Valid Email Address and Invalid 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” Updating Product/s Quantity
Verify “Shopping Cart” Remove Product/s
Verify Check Out
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 “Change Address” in Checkout process
Verify “Add Comment” in Checkout process
Verify “Payment Method” in Checkout process
Verify “Change Address” in Checkout process
Verify “Order Confirmation”
Verify Logoff
Selenium Test Cases
Selenium Test Case 1: Verify Admin Login Functionality in gcrShop application Admin Interface
System.setProperty(“webdriver.chrome.driver”, “C:\\Users\\user\\Downloads\\chromedriver.exe”);
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get(“https://gcreddy.com/project/admin/login.php”);
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();
if (url.equals(“https://gcreddy.com/project/admin/index.php”)) {
System.out.println(“Admin Login is Successful – Passed”);
}
else {
System.out.println(“Admin Login is Unsuccessful – Failed”);
}
driver.close();
———————————————————–
Check the existence of “Logoff” link after login
System.setProperty(“webdriver.chrome.driver”, “C:\\Users\\user\\Downloads\\chromedriver.exe”);
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get(“https://gcreddy.com/project/admin/login.php”);
driver.findElement(By.name(“username”)).sendKeys(“gcreddy”);
driver.findElement(By.name(“password”)).sendKeys(“Temp@2020”);
driver.findElement(By.id(“tdb1”)).click();
Thread.sleep(2000);
try {
boolean linkExists = driver.findElement(By.linkText(“Logoff”)).isDisplayed();
if (linkExists == true) {
System.out.println(“Admin Login is Successful – Passed”);
}
}
catch (NoSuchElementException e1) {
System.out.println(“Admin Login is Unsuccessful – Failed”);
}
driver.close();
Selenium Test Case 2: Customer Registration in gcrShop application User Interface
System.setProperty(“webdriver.chrome.driver”, “C:\\Users\\user\\Downloads\\chromedriver.exe”);
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get(“https://gcreddy.com/project/create_account.php”);
driver.findElement(By.name(“gender”)).click();
driver.findElement(By.name(“firstname”)).sendKeys(“abcd”);
driver.findElement(By.name(“lastname”)).sendKeys(“xyz”);
driver.findElement(By.id(“dob”)).sendKeys(“10/10/2000”);
String email = “sriniram123″+ Math.random()+ “@gmail.com”;
System.out.println(email);
driver.findElement(By.name(“email_address”)).sendKeys(email);
driver.findElement(By.name(“street_address”)).sendKeys(“abcd 2 xyz”);
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(“9876767676”);
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();
String confirmationMessage = driver.findElement(By.tagName(“h1”)).getText();
if (confirmationMessage.equals(“Your Account Has Been Created!”)) {
System.out.println(“Pass”);
}
else {
System.out.println(“Fail”);
}
driver.close();
Selenium Test Case 3: Verify Customer Login in gcrShop User Interface
System.setProperty(“webdriver.chrome.driver”, “E://chromedriver.exe”);
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get(“https://gcreddy.com/project/login.php”);
driver.findElement(By.name(“email_address”)).sendKeys(“sriniram123@gmail.com”);
driver.findElement(By.name(“password”)).sendKeys(“abcd321”);
driver.findElement(By.id(“tdb1”)).click();
Thread.sleep(2000);
try {
boolean elementExistence = driver.findElement(By.linkText(“Log Off”)).isDisplayed();
if (elementExistence == true) {
System.out.println(“Customer Login is Successful – Passed”);
}
}
catch (NoSuchElementException e1) {
System.out.println(“Customer Login is Unsuccessful – Failed”);
}
driver.close();
Selenium Test Case 4: Verify page redirecting functionality (from Admin Interface to User Interface) in gcrShop application.
Business Rule: It has to redirect from Admin to User interface, before admin login, and after admin login.
System.setProperty(“webdriver.chrome.driver”, “C:\\Users\\user\\Downloads\\chromedriver.exe”);
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get(“https://gcreddy.com/project/admin/login.php”);
driver.findElement(By.linkText(“Online Catalog”)).click();
Thread.sleep(2000);
String url1 = driver.getCurrentUrl();
//System.out.println(url1);
if (url1.equals(“https://gcreddy.com/project/”)) {
System.out.println(“Before Login – Page is redirecting from admin to user interface – Passed”);
}
else {
System.out.println(“Before Login – Page is Not redirecting from admin to user interface – Failed”);
}
driver.navigate().back();
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 url2 = driver.getCurrentUrl();
if (url2.equals(“https://gcreddy.com/project/admin/index.php”)) {
driver.findElement(By.linkText(“Online Catalog”)).click();
}
String url3 = driver.getCurrentUrl();
//System.out.println(url3);
if (url3.equals(“https://gcreddy.com/project/”)) {
System.out.println(“After Login – Page is redirecting from admin to user interface – Passed”);
}
else {
System.out.println(“After Login – Page is Not redirecting from admin to user interface – Failed”);
}
driver.close();
}
}
Selenium Test Case 5: Data Driven Testing for admin login functionality by reading test data from a text file
System.setProperty(“webdriver.chrome.driver”, “C:\\Users\\user\\Downloads\\chromedriver.exe”);
FileReader fileObject = new FileReader(“C:\\Users\\user\\Desktop\\input.txt”);
BufferedReader br = new BufferedReader(fileObject);
String line;
int lineCount=0;
int Iteration=0;
while ((line = br.readLine()) !=null) {
String inputData [] = line.split(“, “, 2);
lineCount=lineCount+1;
if (lineCount>1) {
Iteration=Iteration+1;
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get(“https://gcreddy.com/project/admin/login.php”);
driver.findElement(By.name(“username”)).sendKeys(inputData[0]);
driver.findElement(By.name(“password”)).sendKeys(inputData[1]);
driver.findElement(By.id(“tdb1”)).click();
Thread.sleep(2000);
String url= driver.getCurrentUrl();
if (url.equals(“https://gcreddy.com/project/admin/index.php”)) {
System.out.println(Iteration + ” Admin Login is Successful – Passed”);
}
else {
System.out.println(Iteration+” Admin Login is Unsuccessful – Failed”);
}
driver.close();
}
}
br.close();
fileObject.close();
}
}
Selenium Test Case 6: Verify Status of the “Shopping cart” in User Interface of gcrSgop application
System.setProperty(“webdriver.chrome.driver”, “C:\\Users\\user\\Downloads\\chromedriver.exe”);
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get(“https://gcreddy.com/project/”);
driver.findElement(By.linkText(“Shopping Cart”)).click();
String message = driver.findElement(By.xpath(“//*[@id=\”bodyContent\”]/div/div”)).getText();
//System.out.println(message);
if (message.contains(“Your Shopping Cart is empty!”)) {
System.out.println(“Pass”);
}
else {
System.out.println(“Fail”);
}
driver.close();
}
}
Selenium Test Case 7: Write a Test case for Admin Login Locking Functionality in gcr Shop application admin interface.
(Business Rule: Admin Login will be locked for 5 minutes after 3 failed login attempts)
public class TestCase {
static WebDriver driver;
static String ErrorMessage;
public static void main(String[] args) throws IOException, InterruptedException {
System.setProperty(“webdriver.chrome.driver”, “E://chromedriver.exe”);
FileReader file = new FileReader (“C:\\Users\\mahit\\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) {
iteration = iteration+1;
String inputData[] = line.split(“, “, 2);
driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get(“https://gcreddy.com/project/admin/login.php”);
driver.findElement(By.name(“username”)).sendKeys(inputData[0]);
driver.findElement(By.name(“password”)).sendKeys(inputData[1]);
driver.findElement(By.id(“tdb1”)).click();
Thread.sleep(2000);
ErrorMessage = driver.findElement(By.className(“messageStackError”)).getText();
if ((iteration == 4) && (ErrorMessage.contains(“The maximum number of login attempts has been reached. Please try again in 5 minutes.”))) {
System.out.println(iteration+ ” Maximum invalid login attempts are over – Passed”);
}
else if ((iteration <= 3) && (ErrorMessage.contains(“Error: Invalid administrator login attempt.”))) {
System.out.println(iteration+ ” Maximum invalid login attempts are Not over – Passed”);
}
else
{
System.out.println(iteration+” Failed”);
}
driver.close();
}
}
br.close();
file.close();
}
}
Selenium Test Case 8: Batch Testing
public class BatchTesting {
public static WebDriver driver;
//Launch Browser
public void launch(){
driver = new ChromeDriver();
driver.manage().window().maximize();
}
//Close Browser
public void closeBrowser(){
driver.close();
}
//Admin Login
public void login(String Username, String Password){
driver.get(“https://gcreddy.com/project/admin/login.php”);
driver.findElement(By.name(“username”)).sendKeys(Username);
driver.findElement(By.name(“password”)).sendKeys(Password);
driver.findElement(By.id(“tdb1”)).click();
}
public static void main(String[] args) {
System.setProperty(“webdriver.chrome.driver”, “E:/chromedriver.exe”);
BatchTesting obj=new BatchTesting();
//Test Case 1: Verify Admin Login (Positive Test Case)
obj.launch();
obj.login(“admin”, “admin@123”);
String url=driver.getCurrentUrl();
if (url.contains(“https://gcreddy.com/project/admin/index.php”)){
System.out.println(“Test Case 1: “+ “Admin Login is Successful – Passed”);
}
else{
System.out.println(“Test Case 1: “+ “Admin Login is unsuccessful – Failed”);
}
obj.closeBrowser();
//Test Case2: Verify Error Message in Admin Login Functionality (Negative Test Case)
obj.launch();
obj.login(“admin1”, “abcder”);
String ErrorMessage=driver.findElement(By.className(“messageStackError”)).getText();
//System.out.println(ErrorMessage);
if (ErrorMessage.contains(“Error: Invalid administrator login attempt.”)){
System.out.println(“Test Case 2: “+ “Admin Login is Unsuccessful & Showing Correct Error Message -Passed”);
}
else {
System.out.println(“Test Case 2: “+ “Admin Login is Unsuccessful & Not Showing Correct Error Message -Failed”);
}
obj.closeBrowser();
//Test Case 3: Verify Redirect Functionality from Admin Interface to user Interface
obj.launch();
obj.login(“admin”, “admin@123”);
driver.findElement(By.linkText(“Online Catalog”)).click();
String url2=driver.getCurrentUrl();
if (url2.equals(“https://gcreddy.com/project/”)){
System.out.println(“Test Case 3: “+ “Redirected from Admin Interface to User Interface – Passed”);
}
else {
System.out.println(“Test Case 3: “+ “Not Redirected from Admin Interface to User Interface – Passed”);
}
obj.closeBrowser();
}
}