EX NO 1 MATRIX MULTIPLICATION
Aim:
To develop the test cases to perform matrix multiplication using Java
Algorithm:
Step 1: Check the compatibility of the matrix by checking that the number of
columns in the 1st matrix equals the number of rows in the 2nd matrix.
Step 2: Multiply the elements in the first row of the first matrix with the elements
in the first column of the matrix and find the sum of all the products. Then multiply
the element in the first row of the first matrix with the elements of the second
column in the second matrix. Repeat this process till elements of all the positions are
not obtained.
Step 3: Substitute all the elements obtained in Step 2 in their respective position to
find the required product matrix.
Possible TestCases:
1. Number of Columns in First Matrix equals the number of rows in Second Matrix
2. Number of Columns in First Matrix doesn’t match with the number of rows in the
Second Matrix
3. Missing Values or Non-numeric values entered as Matrix Values.
Program:
import [Link];
public class MatrixMultiplicationExample
{ public static void main(String args[]) {
int row1, col1, row2, col2;
Scanner s = new Scanner([Link]);
// Input dimensions of First Matrix: A
[Link]("Enter number of rows in first matrix: ");
row1 = [Link]();
[Link]("Enter number of columns in first matrix: ");
col1 = [Link]();
// Input dimensions of second matrix: B
[Link]("Enter number of rows in second matrix: ");
row2 = [Link]();
[Link]("Enter number of columns in second matrix: ");
col2 = [Link]();
// Requirement check for matrix multiplication
if (col1 != row2) {
[Link]("Matrix multiplication is not possible");
return;
}
int a[][] = new int[row1][col1];
int b[][] = new int[row2][col2];
int c[][] = new int[row1][col2];
// Input the values of matrices [Link]("\
nEnter values for matrix A : "); for (int i = 0; i <
row1; i++)
{
for (int j = 0; j < col1; j++) a[i]
[j] = [Link]();
}
[Link]("\nEnter values for matrix B : ");
for (int i = 0; i < row2; i++)
{
for (int j = 0; j < col2; j++) b[i]
[j] = [Link]();
}
// Perform matrix multiplication
// Using for loop
[Link]("\nMatrix multiplication is : ");
for (int i = 0; i < row1; i++)
{
for (int j = 0; j < col2; j++)
{
// Initialize the element C(i,j) with zero c[i]
[j] = 0;
// Dot product calculation
for (int k = 0; k < col1; k+
+)
{
c[i][j] += a[i][k] * b[k][j];
}
[Link](c[i][j] + " ");
}
[Link]();
}
}
}
Output:
Enter number of rows in first matrix: 3
Enter number of columns in first matrix: 2
Enter number of rows in second matrix: 2
Enter number of columns in second matrix: 4
Enter values for matrix A :
1
2
34
4
56
6
Enter values for matrix B :
2
1
4
6
3
7
5
8
Matrix multiplication is :
8 15 14 22
18 31 32 50
28 47 50 78
Result:
Test cases are developed to perform matrix multiplication and the matrix multiplication
using Java is executed successfully.
EX NO 2 TEST PLAN FOR E-COMMERCE APPLICATION
Aim
To develop the tests plan for testing an e-commerce web/mobile application
([Link]).
TEST PLAN
1. Testing Homepage of an ecommerce Site
2. Testing the Master page of an Online Shopping Website
3. Testing the Login & Registration flow of an eCommerce Site
4. Testing the My Account of an Online Web Store
5. Testing the Search feature of an eCommerce Site
6. Testing the Categories or Product Listing Page (PLP) of an Online ShoppingStore
7. Testing the Product Details Page (PDP) of an eCommerce Site
8. Testing the Shopping Cart of an Online Shopping Platform
9. Testing the Checkout Flow of an ecommerce Site
10. Testing the Order Confirmation Page of an Online Shopping Portal
OUTPUT:
HOMEPAGE
MASTER PAGE
LOGIN & REGISTRATION FLOW
SEARCH FUNCTIONALITY & PRODUCT LISTING PAGE
PRODUCT DETAILS PAGE
CHECKOUT FLOW
Result:
The tests plan are developed for testing an e-commerce web/mobile application.
([Link]).
EX NO :3 DEVELOP TEST CASES FOR E -COMMERCEAPPLICIATION
Aim:
To develop Test Cases For E -CommerceApplication
Test Cases:
HOME PAGE
Test
Module Name Test Scenario Test Case
Case ID
Verify that home page is displayed
TC001 Home Page Verify the details on Home page after login or not.
Verify that user name is displayed on
TC002 Home Page Verify the details on Home page
home page or not
Verify that featured products are
TC003 Home Page Verify the details on Home page
displayed on home page
Verify that Search Functionality is
TC004 Home Page Verify the details on Home page
present on home page.
Verify the home page of application
TC005 Home Page Verify the details on Home page
ondifferent browsers.
TC006 Home Page Verify the details on Home page Verify the alignment on the home page
Verify that products displayed on
TC007 Home Page Verify the details on Home page
homepage are clickable.
Verify that when user clicks on a
TC008 Home Page Verify the details on Home page product, user should be redirected to
product specification page.
Verify that user profile section is
TC009 Home Page Verify the details on Home page
present on home page.
Verify that products displayed on
TC0010 Home Page Verify the details on Home page
homepage are categorised.
SEARCH FUNTIONALTY
Test Module
Case Name Test Scenario Test Case
ID
TC001 Product Verify the product Verify that search field accepts alphabets,
Search searchfunctionality numbers or symbols.
TC002 Product Verify the product Verify that after entering search text and clicking
Search searchfunctionality on search icon, the searchshould be performed.
TC003 Product Verify the product Verify that the search results should beas per the
Search searchfunctionality search query.
TC004 Product Verify the product Verify that user should be able to search based
Search searchfunctionality on product name,brand name or product
specification.
TC005 Product Verify the product Verify that filter should be present forfiltering the
Search searchfunctionality search results bases on Brand, Price, Reviews or
Ratings.
TC006 Product Verify the product Verify that sorting options should bepresent on
Search searchfunctionality search results page.
TC007 Product Verify the product Verify that the number of search resultsdisplayed
Search searchfunctionality on one page.
PRODUCT DETAILS
Test
Case Module Name Test Scenario Test Case
ID
Product Verify the details on Verify that images of product
TC001
Details ProductSpecification page aredisplayed correctly.
Product Verify the details on Verify that price of product is
TC002
Details ProductSpecification page displayed.
Product Verify the details on Verify that product reviews
TC003
Details ProductSpecification page arementioned.
Product Verify the details on Verify that product specifications
TC004
Details ProductSpecification page aredisplayed.
Verify that information about
Product Verify the details on
TC005 IN-Stock/Out-Stock are
Details ProductSpecification page
displayed.
Product Verify the details on Verify that seller ratings should
TC006
Details ProductSpecification page bedisplayed.
CART PAGE
Test Module Test Scenario Test Case
Case Name
ID
Verify the details on Cart Verify that when user clicks on add to cart,
TC001 Cart Page Page
the product should be added to cart.
Verify the details on Cart Verify that user should be able to continue
TC002 Cart Page Page
shopping after adding items tocart.
Verify the details on Cart Verify that item quantity should be
TC003 Cart Page Page increased if user adds same item in cart
again.
Verify the details on Cart Verify that total amount of all items
TC004 Cart Page Page
should be displayed to user.
Verify the details on Cart Verity that the amount displayed to user
TC005 Cart Page Page
CHECK OUT, PAYMENT PAGE
Test Module Name Test Scenario Test Case
Case ID
TC001 Checkout, Verify the details on Verify that payments options applicable
Payments Checkout,Payments Page for the order should be displayed at
Page checkout.
Test Module Name Test Scenario Test Case
Case ID
TC002 Checkout,Payments Verify the details on Verify that delivery details of items
Page Checkout,Payments should be displayed at checkout.
Page
TC003 Checkout,Payments Verify the details on Verify that user should get order details
Page Checkout,Payments by message or email.
Page
TC004 Checkout,Payments Verify the details on Verify that user should be directed to
Page Checkout,Payments home page after checkout.
Page
TC005 Checkout,Payments Verify the details on Verify that user should be displayed
Page Checkout,Payments payment options such as Credit Card,
Page Debit Card, Net Banking etc.
TC006 Checkout,Payments Verify the details on Verify that if user is not registered then
Page Checkout,Payments payment should be done as Guest user.
Page
TC007 Checkout,Payments Verify the details on Verify that user should be provided
Page Checkout,Payments with an option to save the payment
Page method.
TC008 Checkout,Payments Verify the details on Verify that session should be timed out
Page Checkout,Payments if payment is not done for a certain
Page time.
TC009 Checkout,Pay Verify the details on Verify that user details should
ments Page Checkout,Payments be displayed on payment page
Page for
MY ORDER PAGE
Test Module Name Test Scenario Test Case
Case ID
TC001 My OrdersPage Verify the details on Verify that user should be able to
Orders Page track the order on My orders page.
TC002 My OrdersPage Verify the details on Verify that user should be able to
Orders Page change the delivery date and time.
TC003 My OrdersPage Verify the details on Verify that user should be able to
Orders Page cancel the order
TC004 My OrdersPage Verify the details on Verify that user should be able to return
Orders Page the order after delivery of order.
TC005 My OrdersPage Verify the details on Verify that user should be able to
Orders Page exchange the order from My orders
page.
C006 My OrdersPage Verify the details on Verify that user should be able to
Orders Page provide feed back and reviews aboutthe
item delivered.
CUSTOMER SERVICE PAGE
Test Case Module Test Scenario Test Case
ID Name
TC001 Customer Verify the details on Customer Verify that customer service
Service Page Service Page options should be present on the
website.
TC002 Customer Verify the details on Customer Verify that different modes of
Service Page Service Page customer service such as Email,
Chat or Call should be mentioned.
TC003 Customer Verify the details on Customer Verify that waiting time to
Service Page Service Page connect to customer service shold
be displayed to user.
TC004 Customer Verify the details on Customer Verify that customer service
Service Page Service Page should be available in different
languages.
TC005 Customer Verify the details on Customer Verify that the timings of customer
Service Page Service Page service option should be displayedto
user.
RESULT:
Test Cases are developed for E -CommerceApplication
[Link] TEST THE E-COMMERCE APPLICATION AND REPORT DEFECTS IN IT
AIM:
To Test The E-Commerce Application And Report Defects in it
TESTING & BUG REPORTING
HOME PAGE
Test Scenario: Verify the details on Homepage
Test Case: Verify that home page is display ed afterlogin ornot.
Pre- requisites : Browser should beinstalled Internet connection should be present
Test Data: Username,- / Username,Password /-, - / -,Password
Expected Result: Home page should be displayed after login and user name should
bedisplayed on home page.
Bug:
SEARCH FUNTIONALTY
Test Scenario: Verify the product search functionality
Test Case:
1. Verify that search field accepts alphabets ,numbersor symbols.
2. Verify that afterentering search text and clicking on search icon,search should be performed.
3. Browser should be installed Internet connectionshould be present User should be logged in.
Pre- requisites : Browser should be installed Internet connection should be present.
Test Data: Username,- / Username,Password /-, - / -,Password/Product to be searched.
Expected Result: Search should be performed according to searchtext provided by user.
Bug:
PRODUCT DETAILS
Test Scenario: Verify the details on ProductSpecification page
Test Case: Verifythat imagesof product are displa yed correctly
Verifythat price of product is displa yed.
Pre- requisites : Browser should beinstalled Internet connection should be present
Test Data: Product to be searched
Expected Result: Product Details and the images of product should be displayed
correctly.
:
CART PAGE
Test Scenario: Verify the details on CartPage
Test Case: Verifythat when user clicks on addto cart,the product shouldbe added to cart.
Pre- requisites : Browser should beinstalled Internet connection should be present
Test Data: Username,- / Username,Password /-, - / -,Password,Products to be added to cart
Expected Result: The product shouldbe added to cart.
BUG:
CHECK OUT ,PAYMENT
Test Scenario: Verify the details on Checkout,Payments Page
Test Case: Verify that delivery details of items should be displayed at checkout.
Pre- requisites : Browser should beinstalled Internet connection should be present
Test Data: Username,- / Username,Password /-, - / -,Password / Payment Credentials
Expected Result: The checkout pageshould be displayed with payments options.
BUG:
RESULT:
The E-Commerce Application is tested And defects in it was reported as bugs