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

Unit-3 notes

Domain Testing is a black-box testing technique focused on validating system behavior with various input values, utilizing methods like Equivalence Partitioning and Boundary Value Analysis. It distinguishes between Nice Domains, which behave predictably, and Ugly Domains, which can cause errors or unexpected behavior. Additionally, the document discusses the relationship between Domain Testing and Interface Testing, emphasizing the importance of both for robust software quality assurance.

Uploaded by

Magam Vijitha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Unit-3 notes

Domain Testing is a black-box testing technique focused on validating system behavior with various input values, utilizing methods like Equivalence Partitioning and Boundary Value Analysis. It distinguishes between Nice Domains, which behave predictably, and Ugly Domains, which can cause errors or unexpected behavior. Additionally, the document discusses the relationship between Domain Testing and Interface Testing, emphasizing the importance of both for robust software quality assurance.

Uploaded by

Magam Vijitha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

UNIT-III

Domain Testing: domains and paths, Nice & ugly domains, domain testing
domains and interfaces Testing, domain and interface testing, domains and
testability.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Domain Testing in Software Testing


Domain testing is a software testing technique that involves testing a system by
selecting representative values from the input domain. It is a type of Black Box
Testing where the focus is on the range of inputs and ensuring the system behaves
correctly for valid and invalid values.

Key Concepts of Domain Testing


1. Input Domain: The set of all possible inputs to a system.
2. Equivalence Partitioning: Dividing the input domain into different equivalence
classes where each class represents a set of valid or invalid inputs.
3. Boundary Value Analysis (BVA): Testing values at the boundaries of input
domains because errors often occur at edges.
4. Valid and Invalid Test Cases:
o Valid Cases: Inputs that should be accepted by the system.
o Invalid Cases: Inputs that should be rejected by the system.

Techniques Used in Domain Testing

1. Equivalence Class Partitioning (ECP)


o Divide inputs into different groups (equivalence classes).
o Test one value from each class.
o Reduces the number of test cases while maintaining coverage.
Example: If an input field accepts values from 1 to 100, equivalence classes can
be:
o Valid Class: 1 to 100 → Choose 50 for testing.
o Invalid Class: Values <1 (e.g., -5) and values >100 (e.g., 105).
2. Boundary Value Analysis (BVA)
o Focuses on testing at the edges of the input range.
o Tests minimum, maximum, just below and just above boundary values.

Example: For an input range of 1-100, test values: 0, 1, 2, 99, 100, 101.

3. Decision Table Testing


o Used when multiple conditions affect the output.
o Helps test combinations of input conditions efficiently.
4. State Transition Testing
o Applies to systems with different states (e.g., login states).
o Tests valid and invalid state transitions.
Advantages of Domain Testing
 Reduces the number of test cases while ensuring good coverage.
 Helps detect boundary-related defects effectively.
 Can be applied to both numeric and non-numeric inputs.
Limitations of Domain Testing
 May not cover all edge cases in complex systems.
 Does not test internal program logic, only input-output behaviour.

***********************************************************************************************

1
Domains and Paths in Software Testing
In Domain Testing, the focus is on identifying input domains and testing
representative values within them. Paths, on the other hand, relate to the flow of
execution in the system and are analysed in Path Testing. Below, I explain both
concepts in detail.
1. Domains in Testing
A domain in software testing refers to the set of possible inputs for a given program or
function. Testing different domains ensures that the system handles all valid and
invalid inputs correctly.
Types of Domains:
1. Numeric Domains – Inputs are numbers, e.g., age (1-100).
2. Character/String Domains – Inputs are text, e.g., names, passwords.
3. Boolean Domains – Inputs have two values (True/False, Yes/No).
4. Enumerated Domains – Inputs belong to a fixed set, e.g., weekdays (Monday-
Sunday).
5. Structured Domains – Inputs have a complex structure, e.g., dates
(DD/MM/YYYY).
Domain Testing Techniques:
 Equivalence Partitioning: Divides input values into valid and invalid sets.
 Boundary Value Analysis: Tests values at the edges of domains.
 Domain Coverage Testing: Ensures all input domains are covered.
2. Paths in Testing
A path in software testing refers to a sequence of statements or decisions executed
during program execution. Path Testing is a white-box testing technique that ensures
all possible execution paths are tested.
Key Concepts of Path Testing:
1. Control Flow Graph (CFG): Represents the program's flow using nodes
(statements) and edges (transitions).
2. Decision Points: Conditions (e.g., if, while) that determine different execution
paths.
3. Independent Paths: Unique paths that introduce new control flow in the
program.
4. Cyclomatic Complexity: Measures the number of independent paths in a
program. It is calculated as:
V(G)=E−N+2PV(G) = E - N + 2P
Where:
o EE = Number of edges in the graph
o NN = Number of nodes
o PP = Number of connected components
Types of Path Coverage:
 Statement Coverage: Ensures each line of code is executed at least once.
 Branch Coverage: Ensures all decision outcomes (True/False) are tested.
 Path Coverage: Ensures all possible execution paths are tested.
Example of Path Testing:
Consider the following code:
if (x > 0):
print("Positive")
else:
print("Negative or Zero")
 Paths:
o Path 1: x > 0 → "Positive"
o Path 2: x <= 0 → "Negative or Zero"
To achieve complete path coverage, test cases should include x = 5 (positive) and x =
-3 (negative).

2
Difference Between Domain and Path Testing
Feature Domain Testing Path Testing
Focus Input values and their validity Execution paths in the program
Testing Type Black-box testing White-box testing
Techniques Equivalence Partitioning, Control Flow Graph, Cyclomatic
Used Boundary Value Analysis Complexity
Ensure the system handles all Ensure all execution paths are
Goal
input domains correctly covered

Nice & Ugly Domains in Domain Testing


In Domain Testing, input values are classified based on their characteristics and how
they affect the system's behavior. Two important concepts are Nice Domains and Ugly
Domains, which help identify areas where software might fail or behave unexpectedly.

1. Nice Domains
A Nice Domain consists of input values that behave predictably and do not cause
errors in the system. These inputs fall within the expected range and are processed
correctly by the software.
Characteristics of Nice Domains:
✔ Inputs produce expected and valid outputs.
✔ No unusual edge cases or system-breaking values.
✔ Values are within a well-defined, smooth range.
✔ No sudden changes or discontinuities in behaviour.
Example of a Nice Domain:
 A system that accepts ages from 18 to 60:
o Valid inputs: 20, 30, 45, 59
o All these values are within the expected range and cause no issues.
2. Ugly Domains
An Ugly Domain consists of input values that can cause errors, unexpected behavior,
or crashes in the system. These values often occur at boundaries, involve special
cases, or exploit system weaknesses.
Characteristics of Ugly Domains:
❌Inputs that cause crashes, errors, or unpredictable results.
❌Values near boundaries or transition points.
❌Sudden jumps in system behavior (e.g., rounding errors, integer overflows).
❌Special cases like null values, empty strings, and non-standard formats.
Example of an Ugly Domain:
 Age Input (18 to 60):
o Boundary cases: 17, 60, 61 (values close to the limit)
o Invalid cases: -5, 150, "abc" (out-of-range values, incorrect data types)
o Edge cases: 18.5 (if system expects integers, this might break it)

Why Are Nice & Ugly Domains Important?


✅Nice Domains ensure the software behaves correctly under normal conditions.
✅Ugly Domains help testers find potential defects, vulnerabilities, and weaknesses.
By testing both domains, software can be made more robust, reliable, and secure.

3
Domain Testing, Domains, and Interface Testing

1. Domain Testing Overview

Domain Testing is a black-box testing technique used to verify how a system handles
different sets of input values (domains). The goal is to test representative values from
input domains and ensure correct system behaviour.

2. Domains in Domain Testing

A domain in testing refers to the set of all possible inputs that a function, system, or
component can accept.

Types of Domains:

1. Finite Numeric Domains – Example: Age (0-120), percentage (0-100).


2. Infinite Numeric Domains – Example: Temperature (-∞ to +∞).
3. Categorical Domains – Example: Colors (Red, Blue, Green).
4. String/Text Domains – Example: Names, passwords, email addresses.
5. Boolean Domains – Example: True/False, Yes/No.
6. Structured Domains – Example: Date formats (DD/MM/YYYY).

Domain Testing Techniques:

 Equivalence Partitioning: Grouping inputs into valid and invalid partitions.


 Boundary Value Analysis (BVA): Testing edge cases of input ranges.
 Decision Table Testing: Checking combinations of inputs and expected
outcomes.

3. Interfaces and Interface Testing

An interface in software testing refers to the communication boundary between two


systems, components, or modules. Interface testing ensures smooth and accurate data
exchange.

Types of Interfaces:
1. User Interface (UI) – Interaction between users and software (e.g., web forms).
2. Application Programming Interface (API) – Communication between different
software components (e.g., REST, SOAP).
3. Hardware Interfaces – Interaction between software and hardware (e.g., USB,
Bluetooth).
4. Database Interfaces – Communication between an application and a database
(SQL queries).

Interface Testing Techniques:


 Functionality Testing – Verifying correct data exchange.
 Error Handling Testing – Checking how the system handles invalid inputs.
 Performance Testing – Measuring response times and efficiency.
 Security Testing – Ensuring data is transmitted securely (e.g., encryption,
authentication).

4
4. Relationship Between Domain Testing and Interface Testing
Feature Domain Testing Interface Testing
Focus Input values and system behaviour Communication between components
Scope Individual functions/modules Data exchange between systems
Techniques Equivalence Partitioning, BVA API Testing, Security Testing
Goal Ensure correct processing of inputs Ensure smooth integration

Example: Combining Domain & Interface Testing

 Scenario: A user enters their age in an online form.


o Domain Testing:
 Valid Inputs: 25, 40, 59
 Invalid Inputs: -5, 150, "abc"
o Interface Testing:
 Ensuring the system correctly sends and receives age data.
 Validating API responses (e.g., HTTP 200 OK for valid age, HTTP 400
Bad Request for invalid age).

Conclusion
 Domain Testing ensures individual components handle different inputs
correctly.
 Interface Testing ensures seamless data communication between components.
 Both are essential for robust software testing.

Domains and Testability in Software Testing

In software testing, domains represent the set of possible inputs for a system, while
testability refers to how easily and effectively a system can be tested. Understanding
domains helps improve testability by ensuring systematic coverage of inputs and
identifying potential problem areas.

1. Domains in Testing

A domain is the range of possible inputs a software component can accept. The
effectiveness of domain testing depends on how well these domains are defined and
analysed.

Types of Domains
Domain Type Example Testing Challenges
Finite Numeric Age (1-100) Boundary values (e.g., 0, 101)
Infinite Numeric Temperature (-∞ to +∞) Impossible to test all values
Boolean IsAdmin (True/False) Limited test cases
String/Text Username, Password Special characters, empty strings
Enumerated Days of the week (Mon-Sun) Handling unexpected values
Structured Date (DD/MM/YYYY) Leap years, invalid formats

5
Domain Testing Techniques
✔ Equivalence Partitioning – Grouping inputs into valid and invalid classes.
✔ Boundary Value Analysis (BVA) – Testing at the limits of valid ranges.
✔ Decision Table Testing – Analyzing input conditions and outputs systematically.

2. Testability in Software Systems


What is Testability?
Testability is the ease with which a system can be tested. A highly testable system
allows for efficient and accurate defect detection.
Factors Affecting Testability
Factor Description Example
Ability to see internal system
Observability Logging errors, debugging tools
states
Ease of setting up test
Controllability Configurable test environments
scenarios
Lower complexity improves
Simplicity Modular, well-structured code
testability
Automatability Ability to automate tests API testing, CI/CD pipelines
System can be tested in
Decomposability Unit testing, microservices
smaller units
System behavior remains No frequent crashes or unpredictable
Stability
predictable changes
How Domains Affect Testability
 Well-defined domains (e.g., limited input ranges) improve testability by
making testing predictable.
 Complex domains (e.g., infinite inputs) reduce testability due to the large
number of test cases needed.
 Interfaces and APIs should have clear contracts to improve testability by
ensuring smooth integration testing.

3. Improving Testability Through Domain Analysis


Example: Login System
Domain:
 Username (String, 5-20 characters)
 Password (String, 8-16 characters, alphanumeric)
Testability Improvements:
✔ Define clear input domains – Restrict username length and allowed characters.
✔ Use meaningful error messages – "Password too short" instead of "Error 101".
✔ Implement logging & debugging tools – Capture failed login attempts.
✔ Allow automation – Expose APIs for automated login testing.

Conclusion
 Well-defined domains make software easier to test.
 Testability improvements reduce testing effort and increase defect detection.
 Applying domain testing techniques enhances test coverage and reliability.

You might also like