0% found this document useful (0 votes)
8 views

EX_STA_doc

The document outlines a comprehensive test plan for the e-commerce application www.amazon.in, detailing the steps for testing including scope identification, test objectives, environment setup, and defect reporting. It includes specific test cases for functionalities such as user registration, login, product search, and cart management, along with expected outcomes. Additionally, it emphasizes the importance of thorough testing and documentation to ensure application reliability and performance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

EX_STA_doc

The document outlines a comprehensive test plan for the e-commerce application www.amazon.in, detailing the steps for testing including scope identification, test objectives, environment setup, and defect reporting. It includes specific test cases for functionalities such as user registration, login, product search, and cart management, along with expected outcomes. Additionally, it emphasizes the importance of thorough testing and documentation to ensure application reliability and performance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

EX.

NO: 1 Develop the Test Plan for Testing an E-commerce


Date: Web / Mobile Application(www.amazon.in)

Aim:
The aim of this experiment is to develop a comprehensive test plan for testing the
functionality and usability of the e-commerce web/mobile application www.amazon.in.
Algorithm:
1. Identify the Scope: Determine the scope of testing, including the features and
functionalities that need to be tested.
2. Define Test Objectives: Specify the primary objectives of testing, such as functional
testing, usability testing, performance testing, security testing, etc.
3. Identify Test Environment: Define the platforms, browsers, devices, and operating
systems on which the application will be tested.
4. Determine Test Deliverables: Decide on the documents and artifacts that will be
generated during the testing process, such as test cases, test reports, and defect logs.
5. Create Test Strategy: Develop an overall approach for testing, including the testing
techniques, entry and exit criteria, and the roles and responsibilities of the testing team.
6. Define Test Scope and Schedule: Specify the timeline for each testing phase and the
scope of testing for each phase.
7. Risk Analysis: Identify potential risks and their impact on the testing process, and devise
risk mitigation strategies.
8. Resource Planning: Allocate the necessary resources, including the testing team,
hardware , and software required for testing.
9. Test Case Design: Prepare detailed test cases based on the requirements and
functionalities of the e-commerce application.
10. Test Data Setup: Arrange test data required for executing the test cases effectively.
11. Test Execution: Execute the test cases and record the test results.
12. Defect Reporting: Document any defects encountered during testing and track their
resolution.

Test Plan:
The test plan should cover the following sections:
1. Introduction: Briefly describe the purpose of the test plan and provide an overview of the
e- commerce application to be tested.
2. Test Objectives: List the primary objectives of testing the application.
3. Test Scope: Specify the features and functionalities to be tested and any limitations on
testing.
4. Test Environment: Describe the hardware, software, browsers, and devices to be used for
testing.
5. Test Strategy: Explain the overall approach to be followed during testing.
6. Test Schedule: Provide a detailed timeline for each testing phase.
7. Risk Analysis: Identify potential risks and the strategies to mitigate them.
8. Resource Planning: Specify the resources required for testing.
9. Test Case Design: Include a summary of the test cases developed for the application.
10. Test Data Setup: Describe the process of arranging test data for testing.
11. Defect Reporting: Explain the procedure for reporting and tracking defects.
Test Case Table:

Test Test Case Steps Expected Actual Result Status


Cases Result
ID
Valid User Login 1. Open the User should be User logged in
TC001 Amazon successfully successfully
website/app. logged in and and redirected
2. Enter a valid redirected to the to the home
username home page. page. Pass
(email/phone
number).
3. Enter a valid
password.
4. Click the
"Login" button.
Valid Product 1. Open the Relevant search Search results
TC002 Search Amazon results for the for "Laptop"
website/app. product (laptops) are displayed
2. In the search should appear. correctly. Pass
bar, type a valid
product name
(e.g., "Laptop
DELL").
3. Press the
"Search"
button.
Add Product to 1. Open the Product should Product
TC003 Cart Amazon be added to the successfully
website/app. cart, and the cart added to the
2. Search for a icon should cart. Cart count Pass
product (e.g., show the updated.
"DELL"). updated cart
3. Select a count.
product from
the search
results.
4. Click "Add
to Cart" button.
TC004 View Cart After 1. Open the The cart should Cart shows the
Add Amazon display all the product with
website/app. added products correct details
2. Add a with correct (name, Pass
product to the details (name, quantity,
cart. quantity, price). price).
3. Navigate to
the cart icon to
view the cart.
TC005 Remove Product 1. Open the The selected Product
from Cart Amazon product should removed from
website/app. be removed from the cart. Cart
2. Add products the cart, and the count updated. Pass
to the cart. cart count should
3. Navigate to update
the cart icon. accordingly.
4. Click
"Remove" next
to one of the
products.

Explanation:
The test plan is a crucial document that outlines the entire testing process. It ensures that all
aspects of the e-commerce application are thoroughly tested, and the results are
systematically documented.

Output:
Result:
Thus, Test Plan for testing E-Commerce Web/Mobile Application (www.amazon.in) was
written successfully.
Ex.NO: 2 Design the Test Cases for Testing the Ecommerce
Date: Application

Aim:
The aim of this experiment is to design a set of comprehensive and effective test cases
for testing the e-commerce application www.amazon.in.

Algorithm:

1. Understand Requirements: Familiarize yourself with the functional and non-functional


requirements of the e-commerce application.
2. Identify Test Scenarios: Based on the requirements, identify different test scenarios that
cover all aspects of the application.
3. Write Test Cases: Develop test cases for each identified scenario, including preconditions,
steps to be executed, and expected outcomes.
4. Cover Edge Cases: Ensure that the test cases cover edge cases and boundary conditions to
verify the robustness of the application.
5. Prioritize Test Cases: Prioritize the test cases based on their criticality and relevance to the
application.
6. Review Test Cases: Conduct a peer review of the test cases to ensure their accuracy and
completeness.

7. Optimize Test Cases: Optimize the test cases for reusability and maintainability.

Test Case Design:

1. Test Case ID: A unique identifier for each test case.

2. Test Case: A test case is a specific set of actions designed to verify a particular feature or
functionality of a software application.
3. Test Steps: The sequence of actions to be performed during the test.

4. Expected Result: The outcome that is expected from the test.

5. Actual Result: The actual result is the observed outcome of executing a


test case.
6. Status: Test status indicates whether a test case passed or failed based on the comparison of
the actual result to the expected result.
Test Case Table:

Test Test Case Test Steps Expected Result Actual Result Status
Case ID

TC001 User 1. Go to the User should be User


Registration registration page. able to register registration Pass
2. Click on signup successfully. was successful.
button.
TC002 User Login 1. Go to the login User should be able User
page. to log in successfully Pass
2. Click on login. successfully. login the page.
TC003 Search 1. Click a search Search results Search content
Functionality box. should match the was displayed Pass
2. Type a keyword. successfully.
keyword in the
search bar.
TC004 Add a product to 1. .Verify the Product should Product
the shopping "Add to Cart" added to cart. successfully Pass
cart. button is visible added to cart
and enabled.
2. Click the "Add
to Cart" button.
TC005 Cart validation 1. Click on cart. Successful display Added items
2. Display the of added items. are displayed Pass
items in the cart. successfully.
Result:
Thus, Designing the Test Cases for Testing the E-commerce Application (www.Amazon.com)
written successfully.
Ex.no:3 Test the E-Commerce Application and
Date: Report the defects in it

Aim:
The aim of this experiment is to execute the designed test cases and identify defects or
issues in the e-commerce application www.amazon.in.
Algorithm:

1. Test Environment Setup: Set up the testing environment by ensuring all necessary
hardware, software, and test data are available and properly configured.

2. Test Planning: Develop a detailed test plan outlining the scope, objectives, and test cases
that will be executed.

3. Test Case Design: Design specific test cases based on requirements and
specifications, ensuring to cover all relevant scenarios.

4. Test Case Execution: Execute the test cases step-by-step as per the defined procedures,
recording results along the way.

5. Defect Identification: Monitor the results during execution and identify any discrepancies
or issues, documenting them in detail.

6. Defect Reporting: Report the identified defects, providing clear steps to reproduce,
severity, and priority information.

7. Defect Verification: Track defect resolution progress, verifying that developers have fixed
the defects and that fixes are verified through retesting.

8. Retesting: Retest the areas where defects were fixed to ensure that the issue is resolved and
that no new issues have been introduced.

9. Regression Testing: Conduct regression testing to confirm that the changes do not
negatively impact other parts of the system or introduce new defects.

10. Test Closure: After all testing activities, including defect resolution and regression
testing, are completed, close the testing phase and document the results for future reference.
Test Case Table:

Test Test Case Test Steps Expected Actual Result Status


Case ID Result
TC001 User 1. Navigate to User should be User have Pass
Registration the website. registered registered
2. Click on successfully. successfully.
Signup option.
TC002 User login 1. Navigate to User should be User have Pass
the website. logged in logged in
2. Click on successfully. successfully.
login Option.
TC003 Search 1. Click on Searched Searched Pass
Funtionality Search Option. product should product details
2. Enter a be displayed have displayed
keyword to successfully. successfully.
Search.
(eg:iphone)
TC004 Add to cart 1. Click on first Product should Product has Pass
product be added to the been added to
displayed. cart. the cart
2. Click on add successfully.
to cart option.
TC005 Cart Validation 1. Click on Items in the Items in the Pass
Cart option. cart should be cart are
2. Display the displayed displayed
items in the Successfully. successfully.
cart.

Defects of E-Commerce Testing :


1. Often, E-Commerce websites use content management systems like Shopify,
E-commerce to build the site in the shortest possible time.
2. However, these platforms offer integration with third-party services for various
purposes – gift cards, social media features, online payment management, etc.
3. However, too many third-party integrations increase testing effort, as each of them
needs to seamlessly and securely communicate and interact with the site.
4. With new devices and browser versions coming into existence as fast as you can
blink, E-Commerce website testing must keep up.
Output:

Result:
Thus, Testing the E-Commerce application and reporting the defects in it have been
executed successfully.
Ex. No 4: Develop the Test Plan and Design the Test Cases
Date : for an Inventory Control System

Aim:
To develop the test plan and design the test case for an inventory control system.

Algorithm :
Step 1. Requirement Analysis – Gather and analyze system requirements.
Step 2. Define Test Objectives and Scope – Determine the purpose and boundaries of testing.
Step 3. Develop the Test Plan – Establish test strategies, entry, and exit criteria.
Step 4. Set Up Test Environment – Prepare hardware, software, and test data.
Step 5. Identify Test Scenarios – List and prioritize key functionalities for testing.
Step 6. Design Test Cases – Create detailed test cases covering all scenarios.
Step 7. Execute Test Cases – Perform testing and compare actual vs. expected results.
Step 8. Log and Track Defects – Record, prioritize, and track defect resolutions.
Step 9. Perform Regression Testing – Re-test fixed defects and validate system stability.
Step 10. Analyze Results and Final Validation – Review test reports and recommend
deployment readiness.

Test Plan:
1. Understand System Requirements
• Identify key modules like Inventory Management, Stock Control, Supplier
Management, and Reporting.
• Gather functional and non-functional requirements.

2. Define Testing Scope and Objectives


• Set testing goals (accuracy, reliability, performance).
• Choose testing types: Functional, Performance, Security, Usability.

3. Identify Test Environment and Tools


• Define hardware, software, databases, and network setup.
• Select automation tools (Selenium, JMeter).
• Prepare test data.

4. Develop the Test Plan


• Define test objectives, deliverables, and schedules.
• Assign roles and responsibilities.
• Set entry and exit criteria for testing.

5. Design Test Cases


• Identify key test scenarios (e.g., Add Inventory, Stock Updates, Order Processing).
• Example Test Case:
• Test Case ID: TC_001
• Scenario: Add a new inventory item
• Steps: Enter item details → Click "Save" → Verify item is added.
• Expected Result: Item should be successfully added

6. Execute Test Cases


• Run test cases manually or with automation tools.
• Log and track defects using tools like Jira.
• Retest and verify bug fixes.

7. Prepare Test Reports


• Document test results, coverage, and defect analysis.
• Provide a final test summary report with findings and recommendations.
This structured approach ensures thorough testing of the inventory control system

Test Case Table:

Test Test Case Test Expected Actual Result Status


Case ID Steps Result
TC001 User 1. Navigate to User should be User have Pass
Registration the website. registered registered
2. Click on successfully. successfully.
Signup option.
TC002 User login 1. Navigate to User should be User have Pass
the website. logged in logged in
2. Click on successfully. successfully.
login Option.
TC003 Search 1. Click on Searched Searched Pass
Funtionality Search Option. product should product details
2. Enter a be displayed have displayed
keyword to successfully. successfully.
Search.
(eg:iphone)
TC004 Add to cart 1. Click on first Product should Product has Pass
product be added to the been added to
displayed. cart. the cart
2. Click on add successfully.
to cart option.
TC005 Cart Validation 1. Click on Items in the Items in the cart Pass
Cart option. cart should be are
2. Display the displayed displayed
items in the Successfully. successfully.
cart.
Output:

Result:
Thus, to develop the test plan and design the test case for an inventory control system
was successful and output is noted.
Ex. No 5: Execute the test cases against client server or
Date : desktop application and Identify the defects

Aim:
To execute the test cases against a client server and identify the defects

Algorithm:

1. Initialize Test Environment


• Launch the Swiggy application on the required platform (mobile, web, or desktop).
• Ensure a stable internet connection and necessary test credentials.
2.Execute Test Cases
• Perform login with valid credentials and verify the response.
• Place an order using different payment methods and observe order status.
• Check UI visibility for critical buttons (e.g., "Buy Now" on mobile).
• Apply discount coupons and validate price updates.
• Conduct search operations under high traffic and measure response time.
3.Capture Test Results
• Compare expected vs. actual outcomes for each test step.
• Log defects for failed scenarios with screenshots or logs.
4. Analyze Failures & Debug Issues
• Identify patterns in failures (e.g., payment processing, UI inconsistencies).
• Retest after reporting and debugging critical issues.
5.Generate Test Report
• Document test results with Pass/Fail status.
• Provide insights on defects and recommendations for fixes.
Test Case:

Test Test Case Test Expected Actual Result Status


Case ID Steps Result
TC001 Verify login 1. Open the User should be Login fails, and Fail
with valid Swiggy successfully the system
credentials application. logged in and displays an
2. Navigate to redirected to incorrect
the login page. the homepage. "Invalid
3. Enter valid Credentials"
email and
message.
password.
4. Click on
"Login."
TC002 Verify 1. Add eligible The discount The discount Pass
applying a items to the should be is correctly
valid discount cart. applied applied, and
coupon 2. Proceed to successfully. the total price
checkout. is updated.
3. Enter a
valid coupon
code.
4. Click on
"Apply."
TC003 Verify order 1. Add items Order should Payment is Fail
placement with to the cart. be successfully deducted, but
successful 2. Proceed to placed, and the order
payment checkout. confirmation remains in
3. Select a should be "Processing"
valid payment displayed. status
method (Credit indefinitely.
Card).
4. Complete
payment.
TC004 Verify 1. Open The "Buy The button is Fail
visibility of Swiggy on a Now" button not easily
"Buy Now" mobile device. should be visible or is
button on 2. Navigate to prominently hidden below
mobile a product displayed. the fold.
page.
3. Check if the
"Buy Now"
button is
clearly visible.
TC005 Verify search 1. Simulate Search results Search results Pass
performance multiple users should load load within
under high searching for a within an 1.5 seconds.
traffic product at the acceptable
same time. response time
2. Measure (<2 sec).
response time.

DEFECTS IDENTIFIED IN SWIGGY


1. Authentication Failures:
• Defect: Some users cannot log in with valid credentials.
• Identification: Perform login tests with different authentication methods (email, OTP,
social login).
2. Payment Processing Errors:
• Defect: Orders get stuck in "processing" due to payment failures.
• Identification: Simulate different payment methods and check for failed transactions.
3. Usability Problems:
• Defect: The "Buy Now" button is not prominent on mobile devices.
• Identification: Perform UI/UX testing and gather user feedback on accessibility.
Output:
Result:

Thus test cases against the client server was created and defect was identified for these test
cases.
Ex.NO: 6 Test the performance of the E-commerce
Date: Application

Aim:
To test the performance of the E-commerce application(www.Myntra.com).

Algorithm:

1. Identify Performance Metrics: Determine the performance metrics to be measured, such as


response time, throughput, and resource utilization.

2. Define Test Scenarios: Create test scenarios that simulate various user interactions and
loads on the application.
3. Performance Test Setup: Set up the performance testing environment with appropriate
hardware and software.

4. Execute Performance Tests: Run the performance tests using the defined scenarios and
collect performance data.

5. Analyze Performance Data: Analyze the collected data to identify any performance
bottlenecks or issues.

6. Performance Tuning: Implement necessary optimizations to improve the application’s


performance.

Testcase Table:

Test Description Steps Expected Result Actual


Case ID Result
TC_001 Verify login 1. Open Myntra homepage2. 95% of users log (To be filled
performance under Simulate 500 concurrent in successfully after
concurrent user load user logins using valid within 2 execution)
credentials3. Monitor server secondsNo server
response and login time crash or
degradation
TC_002 Validate search 1. Log in with 200 virtual 90% of search (To be filled
feature under high users2. Perform product results return after
load searches using keywords within 1.5 execution)
like "Shirt", "Shoes"3. secondsNo
Apply filters (brand, color, timeouts or errors
price)4. Measure search
response time
TC_003 Evaluate 1. Simulate 300 logged-in Add to cart (To be filled
performance of Add users2. Each user adds 2 completes within after
to Cart under items to cart 1 secondNo execution)
concurrentaccess simultaneously3. Monitor duplication or
response and cart update failure
consistency
TC_004 Measure system 1. 200 users proceed to 95% of orders (To be filled
behavior during checkout with items in confirmed within after
bulk order cart2. Submit orders using 3 secondsNo execution)
placement various payment methods3. payment gateway
Track order processing time or backend errors
and success rate

Program:

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;

import org.openqa.selenium.support.ui.WebDriverWait;

import org.openqa.selenium.support.ui.ExpectedConditions;
import java.time.Duration;

import java.util.List;

public class MyntraAutomation {

public static void main(String[] args) {

System.setProperty("webdriver.chrome.driver", "path/to/chromedriver");
WebDriver driver = new ChromeDriver();

driver.manage().window().maximize();

try {
driver.get("https://www.myntra.com");

WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));

WebElement searchBox =
wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("desktop-
searchBar")));

searchBox.sendKeys("T-shirt");

searchBox.submit();
wait.until(ExpectedConditions.presenceOfElementLocated(By.className("product-
base")));

List<WebElement> products = driver.findElements(By.className("product-base"));

if (!products.isEmpty()) {

products.get(0).click();
}

for (String winHandle : driver.getWindowHandles()) {

driver.switchTo().window(winHandle);
}

WebElement sizeBtn =
wait.until(ExpectedConditions.elementToBeClickable(By.className("size-buttons-size-
button")));

sizeBtn.click();
WebElement addToBag =
wait.until(ExpectedConditions.elementToBeClickable(By.className("pdp-add-to-bag")));

addToBag.click();

System.out.println("Product added to cart!");


} catch (Exception e) {

e.printStackTrace();
} finally {

// Close the driver after delay

try { Thread.sleep(5000); } catch (InterruptedException ignored) {}


driver.quit();

}
}
Output:
Result :
Thus, Performance testing for the E-commerce application is executed successfully.
Ex. No 7: Automate the testing of E-Commerce Application
Date : using Selenium

Aim:
To automate the testing of the E-commerce application (www.bigbasket.com)
using selenium.

Algorithm:
1. Set up the environment:

Install Java Development Kit (JDK) and configure the Java environment variables. -
Eclipse or IntelliJ. Install an Integrated Development Environment (IDE) like.

Download selenium WebDriver and the required web drivers for the browsers you
intend to test (e.g., ChromeDriver, GeckoDriver for Firefox).

2. Create a new Java project in the IDE:

Set up a new Java project in the IDE and include the Selenium WebDriver
library.

3. Develop test cases:

Identify the key functionalities and scenarios to test in the e-commerce application.

Design test cases covering various aspects like login, search, product details, add to
cart, checkout, etc

4.Implement Selenium automation scripts:

Write Java code using Selenium WebDriver to automate the identified test cases.

Utilize different Selenium commands to interact with the web elements, navigate
through pages, and perform various actions.

4. Execute the automated test cases:

Run the automated test scripts against the e-commerce application.


Observe the test execution and identify any failures or defects.
5. Analyze the test results:

Review the test execution results to identify any failed test cases and fix any issues
with the automation scripts if necessary.

6. Report defects:

Discover any defects found during the automated testing process.

Provide detailed information about each defect, including steps to reproduce and
expected results
Testcase Table:

Test Case ID Description Steps Expected Result Actual


Result
TC_LOGIN_001 Verify user can 1. Navigate to User is (To be
log in with bigbasket.com2. Click successfully filled after
valid on Login3. Enter logged in and execution)
credentials mobile number4. Enter navigated to
OTP5. Submit home page
TC_SEARCH_001 Validate 1. Log in to Search results for (To be
product search BigBasket2. Enter "Apples" are filled after
functionality "Apples" in search displayed with execution)
bar3. Click search or filters and pricing
press Enter
TC_CART_001 Verify adding 1. From search results, Product is added (To be
product to cart select a product2. Click to cart; cart icon filled after
on quantity dropdown updates with item execution)
(if available)3. Click count
"Add" button

TC_CART_002 Verify 1. Go to cart2. Increase Quantity is (To be


modifying quantity of any item3. updated and price filled after
product Observe cart update recalculates execution)
quantity in cart correctly

TC_ORDER_001 Verify placing 1. Add item(s) to cart2. Order is placed (To be


an order with Proceed to checkout3. successfully; filled after
valid address Select delivery order ID and execution)
and payment address4. Choose confirmation
payment method5. message
Confirm order displayed

TC_LOGOUT_001 Verify user 1. Click on user User is logged (To be


logout icon/profile2. Click on out and filled after
functionality Logout option redirected to execution)
homepage or
login screen
Progam:
import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;

import org.openqa.selenium.support.ui.ExpectedConditions;

import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;

import java.util.List;
public class BigBasketTest {

public static void main(String[] args) {

System.setProperty("webdriver.chrome.driver", "path/to/chromedriver");
WebDriver driver = new ChromeDriver();

driver.manage().window().maximize();

try {
driver.get("https://www.bigbasket.com");

WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));


try {
WebElement closePopup = wait.until(

ExpectedConditions.elementToBeClickable(By.cssSelector(".bb-customer-
support-close")));

closePopup.click();
} catch (Exception ignored) {

}
WebElement searchBox =
wait.until(ExpectedConditions.elementToBeClickable(By.id("input")));

searchBox.sendKeys("Apples");

WebElement searchButton = driver.findElement(By.className("btn-search"));


searchButton.click();

wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(".product-
container")));
List<WebElement>
addButtons=driver.findElements(By.xpath("//button[contains(text(),'Add')]"));

if (!addButtons.isEmpty()) {

addButtons.get(0).click();

System.out.println("Product added to cart!");


} else {

System.out.println("No Add button found.");

}
WebElement cartIcon = driver.findElement(By.cssSelector("bb-mini-cart .basket-
content"));

cartIcon.click();

System.out.println("Opened cart.");
} catch (Exception e) {

e.printStackTrace();
} finally {

try {

Thread.sleep(5000);
} catch (InterruptedException ignored) {
}

driver.quit();
}

}
Output:
Result:
Thus, automating the testing of the E-commerce application is executed successfully for
using selenium.

You might also like