Question

How do you define Input Space Partition Testing and how can it be used with Unit...

How do you define Input Space Partition Testing and how can it be used with Unit Testing, Integration Testing and System Testing?

Homework Answers

Answer #1

Input Domains

• The input domain to a program contains all the possible inputs to that program

• For even small programs, the input domain is so large that it might as well be infinite

• Testing is fundamentally about choosing finite sets of values from the input domain

Input parameters define the scope of the input domain

– Parameters to a method – Data read from a file

– Global variables

User-level inputs Introduction to Software Testing

4 Input-Space Partitioning (ISP)

• Domain for each input parameter is partitioned into regions

• At least one value is chosen from each region Benefits of ISP

• Can be equally applied at several levels of testing

– Unit

– Integration

– System

• Relatively easy to apply with no automation

• Easy to adjust the procedure to get more or fewer tests

• No implementation knowledge is needed

– just the input space Introduction to Software Testing

Partitioning Domains

• Domain

• Partition scheme q of

• The partition q defines a set of blocks,

Bq = b1 , b2 , … bQ

• The partition must satisfy two properties :

1. blocks must be pairwise disjoint (no overlap)

2. together the blocks cover the domain D

– Assumptions

• Choose a value from each partition

• Each value is assumed to be equally useful for testing

• Application to testing

– Find characteristics in the inputs :

parameters, semantic descriptions, …

– Partition each characteristic

– Choose tests by combining values from characteristics

• Example Characteristics

– Input X is null

– Order of the input file F (sorted, inverse sorted, arbitrary, …)

– Min separation of two aircraft – Input device (DVD, CD, VCR, computer, …) Introduction to Software Testing

• Choosing (or defining) partitions seems easy, but is easy to get wrong

• Consider the “order of file F” b1 = sorted in ascending order b2 = sorted in descending order b3 = arbitrary order but … something’s fishy … What if the file is of length 1? The file will be in all three blocks … That is, disjointness is not satisfied Solution: Each characteristic should address just one property File F sorted ascending - b1 = true - b2 = false File F sorted descending - b1 = true - b2 = false Introduction to Software Testing (Ch 4) © Ammann & Offutt 8 Properties of Partitions • If the partitions are not complete or disjoint, that means the partitions have not been considered carefully enough • They should be reviewed carefully, like any design attempt • Different alternatives should be considered

• We model the input domain in five steps … Introduction to Software Testing

Input Domain

• Step 1 : Identify testable functions (characteristics)

– Individual methods have one testable function

– In a class, each method often has the same characteristics

– Programs have more complicated characteristics—modeling documents such as UML use cases can be used to design characteristics

– Systems of integrated hardware and software components can use devices, operating systems, hardware platforms, browsers, etc

Step 2 : Find all the parameters

– Often fairly straightforward, even mechanical

– Important to be complete

– Methods : Parameters and state (non-local) variables used

– Components : Parameters to methods and state variables

– System : All inputs, including files and databases

• Step 3 : Model the input domain

– The domain is scoped by the parameters

– The structure is defined in terms of characteristics

– Each characteristic is partitioned into sets of blocks

– Each block represents a set of values

– This is the most creative design step in using ISP Introduction to Software Testing

• Step 4 :

Apply a test criterion to choose combinations of values

– A test input has a value for each parameter

– One block for each characteristic

– Choosing all combinations is usually infeasible

– Coverage criteria allow subsets to be chosen

• Step 5 : Refine combinations of blocks into test inputs

– Choose appropriate values from each block.

Unit testing means testing individual modules of an application in isolation (without any interaction with dependencies) to confirm that the code is doing things right.

Integration testing means checking if different modules are working fine when combined together as a group.

System Testing:
System testing is done to check whether the software or product meets the specified requirements or not. It is done by both testers and developers. It contains the System testing and Integration testing. It is done through more positive and negative teat cases.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
i need with this linux: how do i do the following? Create a partition named /dev/sdf1...
i need with this linux: how do i do the following? Create a partition named /dev/sdf1 that uses all the available space on /dev/sdf. Format the partition with the xfs file system. Check your work using the file -s /dev/sdf1command. Mount /dev/sdf1 at /mnt/duplicate Use the xfsdump utility to make a backup of your root file system. Store the backup in the file /mnt/tape/backup.
How can nmap be used for penetration testing, and how can it be used by a...
How can nmap be used for penetration testing, and how can it be used by a security administrator
How may ways can you partition a 3x3 matrix?
How may ways can you partition a 3x3 matrix?
How do we define the past, present and future of a given event in space-time diagram?
How do we define the past, present and future of a given event in space-time diagram?
Answer all 3 three questions. 1.How do you define health? How do you define Illness? 2....
Answer all 3 three questions. 1.How do you define health? How do you define Illness? 2. What makes some people healthy and others unhealthy? 3. How can we create a society in which everyone has a chance to live long healthy lives?
How do you define a shallow foundation in term of the foundation depth? Can we state...
How do you define a shallow foundation in term of the foundation depth? Can we state that the long-term settlement and the short-term settlement of a foundation constructed on a sandy layer are almost the same? Please briefly justify your answer.
Q1. How do you define a shallow foundation in term of the foundation depth? Can we...
Q1. How do you define a shallow foundation in term of the foundation depth? Can we state that the long-term settlement and the short-term settlement of a foundation constructed on a sandy layer are almost the same? Please briefly justify your answer.
Define random error? How do you assess a random error? How do you reduce random error?
Define random error? How do you assess a random error? How do you reduce random error?
a) Can you password protect GRUB? If you can, why would you want to do this?...
a) Can you password protect GRUB? If you can, why would you want to do this? b) Describe how would you go about adding a password? c) If your GRUB gets corrupted, what command can you execute to rebuild it? d) What does the GRUB acronym stand for? How many versions are there as of this semester? e) Describe what the GRUB root partition is. f) What does the command grub2-install command do
4) In quantum mechanics, How do you define and orbital?
4) In quantum mechanics, How do you define and orbital?
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT