Monday, 12 May 2025

Write four test cases for payment through a debit card option for an interactive web app, considering various positive and negative scenarios

 

  • Write four test cases for payment through a debit card option for an interactive web app, considering various positive and negative scenarios 
                                                                             
    Test Case 1: Valid Debit Card Details (Positive Scenario)
  • Test Case ID: TC001
  • Scenario: Successful payment with valid card details.
  • Test Steps:

1.      Navigate to the payment page.

2.      Select the "Debit Card" payment option.

3.      Enter valid debit card details:

§  Card Number: 16 digits

§  Expiry Date: Future date

§  CVV: 3 digits

4.      Click "Pay Now."

  • Expected Result:-Payment is processed successfully, and the user is redirected to the order confirmation page. A success message is displayed, and a confirmation email is sent to the user.

 

Test Case 2: Invalid Card Number (Negative Scenario)

  • Test Case ID: TC002
  • Scenario: Payment with an invalid card number.
  • Test Steps:

1.      Navigate to the payment page.

2.      Select the "Debit Card" payment option.

3.      Enter invalid debit card details:

§  Card Number: Less than 16 digits or contains alphabets/special characters

§  Expiry Date: Future date

§  CVV: 3 digits

4.      Click "Pay Now."

  • Expected Result:-Payment is not processed. An error message such as "Invalid card number. Please check and try again" is displayed.









Test Case 3: Expired Card (Negative Scenario)

  • Test Case ID: TC_DebitCard_003
  • Scenario: Payment with an expired debit card.
  • Test Steps:

1.      Navigate to the payment page.

2.      Select the "Debit Card" payment option.

3.      Enter debit card details:

§  Card Number: 16 digits

§  Expiry Date: Past date

§  CVV: 3 digits

4.      Click "Pay Now."

  • Expected Result:-Payment is not processed. An error message such as "Card has expired. Please use a valid card" is displayed.

 

Test Case 4: Insufficient Funds (Negative Scenario)

  • Test Case ID: TC_DebitCard_004
  • Scenario: Payment with a valid card but insufficient account balance.
  • Test Steps:

1.      Navigate to the payment page.

2.      Select the "Debit Card" payment option.

3.      Enter valid debit card details:

§  Card Number: 16 digits

§  Expiry Date: Future date

§  CVV: 3 digits

4.      Ensure the account associated with the card has insufficient funds.

5.      Click "Pay Now."

  • Expected Result:-Payment is not processed. An error message such as "Transaction declined due to insufficient funds" is displayed.

 

Write 4 test cases for ATMs.

 

Write 4 test cases for ATMs.


 Test Case 1: Valid Cash Withdrawal

Test Case ID: ATM_TC_001
Description: Verify that a user can withdraw cash successfully if they have sufficient balance.
Preconditions: The ATM has sufficient cash, and the user has a valid ATM card with a sufficient account balance.
Test Steps:

1.      Insert the ATM card.

2.      Enter the correct PIN.

3.      Select "Withdraw Cash."

4.      Enter an amount within the account balance limit.

5.      Confirm the transaction.
Expected Result: The ATM dispenses the correct amount, deducts it from the account, and prints a receipt (if requested).
Actual Result: The ATM successfully dispensed the cash, updated the account balance, and provided a receipt.

 Test Case Status: Pass

Test Case 2: Insufficient Balance for Withdrawal

Test Case ID: ATM_TC_002
Description: Verify that a withdrawal request is declined if the balance is insufficient.
Preconditions: The ATM is operational, and the user has an ATM card with a balance lower than the requested withdrawal amount.
Test Steps:

1.      Insert the ATM card.

2.      Enter the correct PIN.

3.      Select "Withdraw Cash."

4.      Enter an amount greater than the available balance.

5.      Confirm the transaction.
Expected Result: The ATM displays an error message: "Insufficient Balance," does not dispense cash, and does not deduct the amount.
Actual Result: The ATM displayed an error message and did not dispense cash.
Test Case Status: Pass

 

Test Case 3: Incorrect PIN Entry

Test Case ID: ATM_TC_003
Description: Verify that the system denies access if the wrong PIN is entered multiple times.
Preconditions: The ATM is operational, and the user has a valid ATM card.
Test Steps:

1.      Insert the ATM card.

2.      Enter an incorrect PIN.

3.      Repeat steps 1-2 for three consecutive incorrect attempts.
Expected Result: The ATM locks the account or temporarily blocks further attempts after three incorrect PIN entries.
Actual Result: The ATM displayed a "Card Blocked" message after three incorrect attempts and denied further access.
Test Case Status: Pass

Test Case 4: Card Retention Due to Expired Card

Test Case ID: ATM_TC_004
Description: Verify that the ATM retains an expired card.
Preconditions: The ATM is operational, and the user has an expired ATM card.
Test Steps:

1.      Insert the expired ATM card.

2.      The ATM system checks the card’s expiration date.
Expected Result: The ATM does not proceed with transactions, displays a message ("Card Expired"), and retains the card if applicable.
Actual Result: The ATM displayed a "Card Expired" message but returned the card instead of retaining it.
 Test Case Status: Fail

 

Write any 4 tests cases for traffic signal.

 

Write any 4 tests cases for traffic signal.

Test Case 1: Red Light Duration

  • Test Case ID: TS001
  • Test Description: Verify that the Red light stays on for the correct duration.
  • Test Steps:

1.      Start the traffic signal system.

2.      Observe the Red light when it turns on.

3.      Use a timer to measure how long it stays on.

  • Expected Result: The Red light should stay on for the specified time (e.g., 60 seconds).
  • Pass/Fail Criteria: Pass if the duration matches 60 seconds; Fail if it is too short or too long.

 

Test Case 2: Green Light After Red

  • Test Case ID: TS002
  • Test Description: Verify that the Green light turns on after the Red light and stays for the correct duration.
  • Test Steps:

1.      Wait for the Red light to turn off.

2.      Observe the Green light turning on.

3.      Measure how long it stays on using a timer.

  • Expected Result: The Green light should turn on immediately after the Red light and stay on for the specified time (e.g., 45 seconds).
  • Pass/Fail Criteria: Pass if the Green light follows the Red light and stays for 45 seconds; Fail otherwise.

 

Test Case 3: Yellow Light Transition

  • Test Case ID: TS003
  • Test Description: Verify that the Yellow light turns on before switching between Red and Green lights.
  • Test Steps:

1.      Observe the Yellow light turning on after the Green light.

2.      Measure how long the Yellow light stays on.

  • Expected Result: The Yellow light should turn on for a short time (e.g., 5 seconds) before changing to Red.
  • Pass/Fail Criteria: Pass if the Yellow light is on for the correct time; Fail otherwise.

 

Test Case 4: Pedestrian Crossing

  • Test Case ID: TS004
  • Test Description: Verify that the pedestrian crossing signal works correctly.
  • Test Steps:

1.      Press the pedestrian crossing button.

2.      Observe the pedestrian signal (e.g., Green light for crossing).

3.      Check if it stops after the crossing duration ends.

  • Expected Result: The pedestrian signal should turn Green when the traffic light is Red and stop after the crossing time (e.g., 30 seconds).
  • Pass/Fail Criteria: Pass if the pedestrian signal behaves as expected; Fail otherwise.


 






Write a test plan for the following sections of IEEE 829 test plan template for a online library system. a) Scope of testing. b) Objectives. c) Risks. d) Strategy. e) Approach.

 

Write a test plan for the following sections of IEEE 829 test plan template for a online library system. 

a) Scope of testing. b) Objectives. c) Risks. d) Strategy. e) Approach.

 

a) Scope of Testing

  • User registration and login

  • Searching and browsing books

  • Viewing book details (author, availability, ISBN)

  • Issuing and returning books

  • Viewing user’s issued book history

  • Admin functions: add/edit/delete books

  • Notifications for due dates


b) Objectives

  • To check that all main features of the online library system are working properly.
  • To make sure both user and admin features are built as needed.
  • To test if the system runs well, is easy to use, and keeps data safe.
  • To find and fix any errors, design issues, or slow parts before the system is launched.

c) Risks

 

Risks

Impact

Mitigation

Unclear or changing requirements

High

Regular reviews with stakeholders

Data inconsistency due to improper return/book status updates

Medium

Conduct integration testing

Limited testing resources or devices

Medium

Cloud testing tools

Network issues affecting access to the online library

Low

Test under different network conditions


D)Test Strategy

  • Functional Testing: To verify each module (search, issue, return) works as expected
  • Usability Testing: To ensure the user interface is intuitive for students and admins
  • Performance Testing: To check how the system performs under heavy user load
  • Security Testing: To ensure secure login and protect user data and records
  • Regression Testing: To make sure new changes don’t break existing features

E)Test Approach

  • Use black-box testing focusing on user inputs and expected output
  • Perform manual testing for exploratory and usability tests
  • Use automated scripts for repetitive tasks like login, search, and book issue/return
  • Divide the test cases into positive (valid inputs) and negative (invalid inputs)
  • Perform testing across different browsers and devices for compatibility
  • Log defects in a defect tracking tool and retest after fixes.

 

Saturday, 26 April 2025

DS Question Bank

                                                               Data Structure Using C

         Question Bank 


  1. What is Graph ? Explain Adjacency list of graph ,adjacency matrix with example

  2. Consider the following Graph and attempt the following :

Weighted graph - Hyperskill

- print the adjacency matrix of the graph 

  Traverse DFS and BFS

  1. Convert the following Infix expression into prefix using a table.

(A+B)/(C+D*E)

  1. Convert the following infix expression into postfix using stacks (symbol table)

A ^ (B – C * D /E) + F

  1. What is stack ? Write Operation on stack with example (Program)

  2. Write a program to implement a dynamic stack

  3. Write a Function Preorder,Postorder,Inorder Traversal

  4. Write a function to sort a DLL

  5. Write a function to print the minimum value from a BST

  6. Write a  program to add two polynomials using 1D Arrays

  7. Draw BST for the following and traverse inorder, preorder and postorder-

45, 40, 27, 58, 63, 72, 18, 44, 47, 50

  1. Write a program to Selection Sort 

  2. Write a Program Linear search on unsorted data 

  3. Explain different types of AVL Rotation with an example.

  4. Data Structured Type

  5. DEQUE, IRDEQ and ORDEQ

  6.  Define degree of a tree, generation, pendent node, depth of a tree 

  7. Algorithm Characteristics

  8. Depth First Search (DFS)