0% found this document useful (0 votes)
10 views32 pages

3cs510ic24 - Stqa Minor Lect-8

Uploaded by

aafadf
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)
10 views32 pages

3cs510ic24 - Stqa Minor Lect-8

Uploaded by

aafadf
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/ 32

3CS510IC24- Software Testing & Quality

Assurance
Lecture-8 Odd Sem 24-25
5th Semester – Minor Course
Prof. Daiwat Vyas
DELL , 15-11-2024, 05:31:41

What is Integration Testing?


• Integration testing involves testing different modules together
to ensure they function as expected when combined. The goal
is to identify interface errors, and ensure correct
communication and data flow between components.
DELL , 15-11-2024, 05:31:41

Analogy: Assembling a Machine


• Imagine assembling a machine from separate parts (modules).
Even if each part works individually, they might not fit together
perfectly. Integration testing is like checking if all the parts
function together smoothly.
DELL , 15-11-2024, 05:31:41

Types of Interfaces in Software


• 1. Procedural Interface: Functions or procedures calling each
other.
• 2. Data Interface: Modules exchange data via parameters or
global variables.
• 3. Control Interface: Controls the flow of execution between
modules.
• 4. User Interface: Interaction between the user and the system.
DELL , 15-11-2024, 05:31:41

Example: Interfaces in a C Program


• 1. Procedural: Function A calls Function B for computation.
• 2. Data: Function A passes data (variables) to Function B via
parameters.
• 3. Control: Main function calls modules based on user input or
conditions.
Interface Errors
• Interface errors occur when modules fail to communicate
correctly. Types of errors:
• 1. Incorrect parameter passing (wrong data type or order).
• 2. Mismatch in data format or values.
• 3. Missing or incorrect control flow.
• 4. Unexpected outputs when combining modules.
Granularity in System Integration Testing
• Granularity refers to the level of detail at which integration
testing is performed:
• 1. Fine-grained: Testing smaller combinations of modules first.
• 2. Coarse-grained: Testing larger combinations or subsystems.
• Both approaches help ensure that errors are detected at
different levels.
System Integration Techniques
• 1. Top-down Integration: Start by testing the top-level modules
and gradually add lower-level ones.
• 2. Bottom-up Integration: Start with testing lower-level
modules first and gradually add higher-level ones.
• 3. Big Bang Integration: Test all components together in one
go. Riskier but efficient if components are stable.
• 4. Incremental Integration: Combine a few modules at a time
and gradually build up.
Example: Top-down Integration in C
• In a C program, you start testing from the 'main' function. As
you integrate more functions, you check if they work correctly
together.
• For instance, after testing the main function, you add and test
individual helper functions one by one.
From 13—Sept—2024
Integration Testing in Detail
Types of Integration Testing
• Big Bang Integration:

• All modules are integrated at once and tested together.


• Example: Building a website with multiple pages. Testing all pages together only after
everything is coded.

• Incremental Integration:

• Modules are integrated and tested step by step.


• Types:
• Top-Down Integration: Start from the top-level modules and integrate downwards.
• Bottom-Up Integration: Start from lower-level modules and integrate upwards.
• Example: Developing an e-commerce platform, testing payment, product listing, and
cart functions incrementally.
Types of Interfaces in Software Systems
• Application Programming Interfaces (APIs):

• Used to allow communication between software modules.


• Example: A mobile app fetching data from a weather API.

• User Interfaces (UIs):

• Interfaces that allow interaction between the user and the system.
• Example: The login screen of an application.
Types of Interfaces in Software Systems
• Hardware Interfaces:

• Interfacing between hardware components and software.


• Example: Printer interacting with a word processor.

• Database Interfaces:

• Interaction between a software module and a database.


• Example: A banking application interacting with a database for
transaction data retrieval.
Types of Interfaces in Software Systems
• Hardware Interfaces:

• Interfacing between hardware components and software.


• Example: Printer interacting with a word processor.

• Database Interfaces:

• Interaction between a software module and a database.


• Example: A banking application interacting with a database for
transaction data retrieval.
Common Interface Errors
• Data Mismatch:

• Incorrect data formatting or types being passed between modules.


• Example: A web service expecting a date in "MM/DD/YYYY" format but
receiving "DD/MM/YYYY".

• Communication Failure:

• A failure in connecting or transmitting between modules.


• Example: A payment gateway service being down, causing checkout
failures.
Common Interface Errors
• Protocol Errors:

• Incorrect communication protocols between interfaces.


• Example: An HTTP request expecting HTTPS, causing data transfer
failures.

• Timing Issues:

• Errors when one module's response is delayed or arrives too quickly.


• Example: A real-time stock trading system not handling latency properly,
causing incorrect trades.
Granularity of System Integration Testing
• Fine-Grained Testing:

• Focuses on testing smaller, tightly coupled modules first.


• Example: Testing a login system by integrating the front-end login form with the
back-end authentication server.

• Coarse-Grained Testing:

• Involves testing larger, loosely coupled modules together.


• Example: Testing the entire user management system, including registration,
login, and profile updates.

• Analogy: Fine-grained testing is like testing each ingredient of a recipe before


cooking. Coarse-grained testing is like tasting the entire dish after it’s cooked.
System Integration Techniques
• Top-Down Integration Testing:

• Start testing from the top-level modules and proceed downwards.


• Example: In an ERP system, start by testing the dashboard interface,
followed by individual modules like inventory and accounting.

• Bottom-Up Integration Testing:

• Start from lower-level modules and integrate upwards.


• Example: Test database queries first, then integrate the application’s UI.
System Integration Techniques
• Sandwich (Hybrid) Integration Testing:

• Combines top-down and bottom-up approaches.


• Example: Testing an e-commerce website by integrating the front-end
with the back-end, while also testing the back-end database with front-
end services.

• Big Bang Integration Testing:

• Integrate all modules simultaneously and test the system as a whole.


• Analogy: Similar to assembling all parts of a machine and testing it once
at the end, instead of testing each part during assembly.
Test Planning for System Integration Testing
• Scope Definition:

• Clearly outline the system modules to be tested and their


interactions.

• Example: For a mobile banking app, specify that testing will include
account management, transaction processing, and customer
support modules.
Test Planning for System Integration Testing
• Test Data Preparation:

• Identify and create realistic test data that simulates real-world


scenarios.
• Example: Use valid and invalid credit card numbers for testing payment
integration.

• Environment Setup:

• Ensure that the test environment mirrors the production environment


as closely as possible.
• Example: For an e-commerce platform, ensure the test environment
includes mock servers for third-party services like payment gateways.
Test Planning for System Integration Testing
• Test Case Development:

• Design test cases that cover all critical module integrations.

• Example: A test case for verifying that the cart, payment gateway,
and inventory modules work seamlessly together.
Real-Life Example: Payment Gateway Integration Testing

• Scenario: An e-commerce site integrating multiple payment


gateways (PayPal, Stripe, etc.).

• Top-Down Testing: Start by testing the user interface for payment


options, then move down to test the gateway services.

• Bottom-Up Testing: Test individual payment modules (like Stripe or


PayPal) and then integrate them with the website's UI.
Real-Life Example: Payment Gateway Integration Testing
• Test Plan Overview

• Objective: Ensure that the payment gateway integration (PayPal, Stripe, etc.)
functions correctly when integrated with the e-commerce platform’s other
modules (cart, checkout, order confirmation).

• Scope: Testing includes functional, performance, and security aspects of the


payment process for multiple payment gateways.

• Modules to Integrate:
• Shopping cart
• Checkout process
• Payment gateway (PayPal, Stripe, etc.)
• Order confirmation system
Real-Life Example: Payment Gateway Integration Testing
• Test Environment

• Environment Setup:
– A staging environment closely replicating the production environment.
– Simulated third-party payment gateway (sandbox accounts for PayPal, Stripe).
– Database to log transactions, order details, and payment status.

• Configuration Requirements:
– Secure HTTPS environment.
– Active test accounts for PayPal and Stripe.
– Connectivity to external systems (e.g., email server for confirmation emails).
Real-Life Example: Payment Gateway Integration Testing
• Test Data Preparation

• Test Data:
• Valid Credit Card Details:
– Card numbers, expiry dates, and CVV numbers for testing successful
transactions.
• Invalid Credit Card Details:
– Expired cards, invalid numbers, and incorrect CVV for testing error
scenarios.
• Different Payment Methods:
– PayPal account, debit card, credit card, Stripe account.
Real-Life Example: Payment Gateway Integration Testing
• Test Scenarios
• Scenario 1: Successful Payment with PayPal

• Preconditions: User adds items to cart and proceeds to checkout.


• Test Steps:
• Select PayPal as the payment method.
• Redirect to PayPal login page.
• Log in to PayPal.
• Confirm payment.
• Verify the user is redirected back to the e-commerce site.
• Verify order confirmation and payment status (success).
• Expected Result: User receives an order confirmation and the payment is
marked as successful.
Real-Life Example: Payment Gateway Integration Testing
• Test Scenarios
• Scenario 2: Successful Payment with Credit Card (Stripe)

• Preconditions: User adds items to cart and proceeds to checkout.


• Test Steps:
• Select "Credit Card (via Stripe)" as payment method.
• Enter valid credit card details.
• Submit the payment.
• Verify transaction processing.
• Verify order confirmation and payment status (success).
• Expected Result: Order confirmation is displayed, and payment is
recorded successfully in the database.
Real-Life Example: Payment Gateway Integration Testing
• Test Scenarios
• Scenario 3: Failed Payment Due to Invalid Credit Card (Stripe)

• Preconditions: User adds items to cart and proceeds to checkout.


• Test Steps:
• Select "Credit Card (via Stripe)" as payment method.
• Enter invalid credit card details (expired card or incorrect CVV).
• Submit the payment.
• Verify the error message (e.g., "Invalid card details").
• Expected Result: User receives an error, and payment does not proceed.
No transaction is recorded.
Real-Life Example: Payment Gateway Integration Testing
• Test Scenarios
• Scenario 4: Canceled Payment on PayPal

• Preconditions: User adds items to cart and proceeds to checkout.


• Test Steps:
• Select PayPal as the payment method.
• Redirect to PayPal login page.
• Cancel payment on PayPal page.
• Verify user is redirected back to the e-commerce site with the
payment status as canceled.
• Expected Result: The system correctly shows the payment as canceled,
and no transaction is recorded.
Integration Test Cases (Sample)
Real-Life Example: Payment Gateway Integration Testing
• Exit Criteria

• All critical test cases have been executed.


• No high-priority defects related to payment processing remain
unresolved.
• Performance and security tests are completed.
• The payment gateways function correctly in the integrated
environment.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy