Requirement: If we are testing a program that
generates the report card for a group of 10000students
Problem: execute 1000 cases for 10000 students
Impossible
Solution: we can divide the test data as per the grades
A grade 80-100
B Grade 60-80
C grade 40-60 ........
Then test the application by picking up the scores of 2-3 students belonging to each grade class. In this way we can test the application for the entire set of test data.
System
Outputs
Invalid inputs Valid inputs
Part 1: Equivalent Partitioning
Equivalent Partitioning
Equivalent partitioning is test case design strategy in black box testing
This method is typically used to reduce the total number of test cases to a finite set of testable test
cases, still covering maximum requirements
Inputs to the software or system are divided into groups that are expected to exhibit similar
behavior, so they are likely to be processed in the same way. Equivalent Partitioning
Equivalence partitions (or classes) can be found for both valid data and invalid data, i.e. values that should be rejected
Tests can be designed to cover partitions. Equivalence partitioning is applicable at all levels
of testing
Equivalence partitioning as a technique can be used to achieve input and output coverage. It can
be applied to human input, input via interfaces to a system, or interface parameters in integration
testing.
How to divide equivalence class
Input data should be divided into equivalence classes based on consideration of
Valid vs. invalid input values
Valid vs. invalid output values
Similarity and difference of input values
Similarity and difference of output values
Similarity and difference of expected processing
Designing Test Cases Using EP
To use equivalence partitioning, you
will need to perform two steps:
1. Identify the equivalence classes
2. Design test cases
STEP 1: IDENTIFY EQUIVALENCE CLASSES
Take each input condition described in the specification and derive at least two equivalence classes for it.
One class represents the set of cases which satisfy the condition (the valid class) and one represents cases which do not (the invalid class )
STEP 2: DESIGN TEST CASES
List selected cases in to test design document
Example
A savings account in a bank earns a different rate of interest depending on the balance in the account
If a balance in the range $0 up to $100 has a 3% interest rate, a balance over $100 and up to $1000 has a 5% interest rate, and balances of $1000 and over have a 7% interest rate, we would initially identify three valid equivalence partitions and one invalid partition
Example: Define Test Cases
Case 1: Valid Partition (For 3% interest) - input one or some values from 0.00 to 100.00 (e.g. 55)
Case 2: Valid Partition (For 5% interest) - input one or some values from 100.01 to 999.99 (e.g. 345.67)
Case 3: Valid Partition (For 7% interest) - input one or some values > 1000.00 (e.g. 2345)
Case 4: Invalid Partition - input one or some values < 00.00 (e.g. -0.01)
Part 2: Value Boundary Analysis
Value Boundary Analysis
Value Boundary analysis (BVA) is based on testing at the boundaries between partitions
Behavior at the edge of each equivalence partition is more likely to be incorrect, so boundaries are an area where testing is likely to yield defects
The maximum and minimum values of a partition are its boundary values
A boundary value for a valid partition is a valid boundary value; the boundary of an invalid partition is an invalid boundary value
Tests can be designed to cover both valid and invalid boundary values. When designing test cases, a test for each boundary value is chosen Value Boundary Analysis
Boundary value analysis can be applied at all test levels. It is relatively easy to apply and its defect
finding capability is high; detailed specifications are helpful
This technique is often considered as an extension of equivalence partitioning. It can be used on
equivalence classes for user input on screen as well as, for example, on time ranges (e.g. time out,
transactional speed requirements) or table ranges (e.g. table size is 256*256).
Boundary values may also be used for test data selection.
Example
Sample: consider a printer that has an input option of
To apply boundary value analysis, we will take the minimum and maximum (boundary) values from the valid partition (1 and 99 in this case) together with the number of copies to be made, from 1 to 99
The first or last value respectively in each of the invalid partitions adjacent to the valid partition (0 and 100 in this case). In this example we would have three equivalence partitioning tests (one from each of the three partitions) and four boundary value tests.
Why Both EP and BVA?
=> Because:
Every boundary is in some partition, if you did only boundary value analysis you would also have tested every equivalence partition.
If only testing boundaries we would probably not give the users much confidence as we are using extreme values rather than normal values Extending EP & BVA
Sample: If you are booking a flight, you have a choice of Economy/Coach, Premium Economy, Business or First Class tickets. Each of these is an equivalence partition in its own right and should be tested, but it doesn't make sense to talk about boundaries for this
type of partition, which is a collection of valid things
=> Only use Equivalent Partitioning for the sample
Designing Test Case
Identified the conditions that you wish to test by using equivalence partitioning and boundary value analysis,
The more test conditions that can be covered in a single testcase, the fewer test cases will be needed in order to cover all the conditions. This is usually the best approach to take for positive tests and for tests that you are reasonably confident will pass. However if a test fails, then we need to find out why it failed - which test condition was handled incorrectly? We need to get a good balance between covering too many and too few test conditions in our tests.
Part 3: Case study 1
If an internal telephone system for a company with 200 telephones has 3-digit extension numbers from 100 to 699, we can identify the following partitions and boundaries
Time: 5’
Case study 2
Calculate Payment Application
Time: 15’
translate
Hôm nay đọc gì
-
QTP là phần mềm dùng để kiểm tra chức năng (functional test) và cho phép thực hiện kiểm tra hồi qui (regression test) một cách tự động. Đây...
-
Bạn tải phần mềm QTP tại đây http://www.automationrepository.com/2011/08/download-qtp-11-trial-version-from-hp/ Yêu cầu phần mềm gồm: ...
Nhãn
automation testing
bài toán về phân tích giá trị biên
bai-tap-viet-tc-giao-dien
blackbox-testing
bugzilla
checklist
cong-cu-test-hieu-nang
GUI
hacker
jira
jmeter
kiem thu phan mem
kiem-thu-phan-mem-cho-nguoi-moi
kỹ thuật khai thac lỗ hổng xss
manual testing
mau-viet-test-case
quan-ly-bug-trong-mot-du-an-nhu-the-nao
sai-lam-hoc-tester
Sql injection
tao-kich-ban-dang-nhap-bang-selenium-ide
usability testing