test data generation for covering functionality of database applications
DESCRIPTION
Test data generation for covering functionality of database applications . Authors: Sergey Zelenov, Vitaly Omelchenko, Evgeny Kostychev Institute for System Programming at the Russian Academy of Sciences Moscow, Russian Federation . Target. Source. Extract. Load. Transform. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/1.jpg)
Test data generation for covering functionality of database applications
Authors: Sergey Zelenov, Vitaly Omelchenko, Evgeny Kostychev
Institute for System Programming at the Russian Academy of Sciences
Moscow, Russian Federation
![Page 2: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/2.jpg)
Database - applications
• extraction source data• changing values of source data• transformation of input data• loading data • changing in the target some data
Extract
Change
TransformLoad
Change
Source Target
![Page 3: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/3.jpg)
Problem
Cartesian product
combinatorial explosion
problem of analyzing test results
![Page 4: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/4.jpg)
Goal
• cover all branches of the functionality• test set → min
Ideally• one test data set per one functionality branch
![Page 5: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/5.jpg)
Hierarchy of combinators
field1 field2 field3 field4
Cartesian product
Cartesian product
All X with any YAll Y with any X
X Y
![Page 6: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/6.jpg)
Comparison of the toolsDTM Data Generator
Turbo Data
DB Monster
Agenda HTDGen Pinery
generation for one field
random
from tables
from libraries
auto incremental
random by a mask
dependent tables
user procedures
generation for many fields
combinators
hierarchy of different combinators
![Page 7: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/7.jpg)
Method description
Model ofthe SUT
Catalogue ofrequirements
Documentation analysis
Formalization of
requirements
Formulation coveragecriteria
Normativedocuments
Generationof test data
CRITERIA
- …- …- …- …
Coveragecriteria
Testset
![Page 8: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/8.jpg)
ExampleBank credit system
• the client type (V, U)• the credit type (A, B) bonus or penalty• the repaid sum
![Page 9: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/9.jpg)
Model ofthe SUT
Catalogue ofrequirements
Documentation analysis
Formalization of
requirements
Formulation coveragecriteria
Normativedocuments
Generationof test data
CRITERIA
- …- …- …- …
Coveragecriteria
Testset
![Page 10: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/10.jpg)
1. Requirements elicitation
Monthly ≤ Repay ≤ Debt
VIP USUAL
Repay < Monthly
USUAL VIP
Repay > Debt
Loan ‘A’ Loan ‘B’ Loan ‘A’ Loan ‘B’
A
Penalty0
Penalty3%
Bonus 2%
Bonus 5%
Bonus 1%
Refund
B
e-mail is specified
Notification
![Page 11: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/11.jpg)
Model ofthe SUT
Catalogue ofrequirements
Documentation analysis
Formalization of
requirements
Formulation coveragecriteria
Normativedocuments
Generationof test data
CRITERIA
- …- …- …- …
Coveragecriteria
Testset
![Page 12: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/12.jpg)
MP ≤ P ≤ D
“V” “U”
P < MP
“U” “V”
P > D
“A” “B” “A” “B”
A
0 -3% +2%+5% +1% refund
B
Notification
MP to be pay
D debt
P repaid
CL client type (V, U)
CR credit type (A, B)
E e-mail
A.I P<MP && CL="V" =>penalty 0;
P<MP && CL="U" =>penalty 3%;
A.II.1 MP≤P≤D && (CL="V" && CR="B" || CL="U" && CR="A")
=> bonus 2%;
A.II.2 MP≤P≤D && CL="V" && CR="A" => bonus 5%;
A.II.3 MP≤P≤D && CL="U" && CR="B" => bonus 1%;
A.III P>D => refund.
B. E≠"" => notification.
2. Formalization of requirements
![Page 13: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/13.jpg)
Model ofthe SUT
Catalogue ofrequirements
Documentation analysis
Formalization of
requirements
Formulation coveragecriteria
Normativedocuments
Generationof test data
CRITERIA
- …- …- …- …
Coveragecriteria
Testset
![Page 14: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/14.jpg)
3. Formulation of coverage criteria The division rules for parameter P
•MP = D
•MP < DMP=D
P<MP P>MPP=MP
MP<P<DP<MP P>D
P=MP P=D
![Page 15: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/15.jpg)
The division rules for parameters CL and CR
•P < MP → 2 subsets (CL)
•MP ≤ P ≤ D → 4 subsets (CL × CR)
•P > D → 1 set MP ≤ P ≤ D
“V” “U”
P < MP
“U” “V”
P > D
“A” “B” “A” “B”
A
0 -3% +2%+5% +1% refund
![Page 16: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/16.jpg)
The division rules for the parameter E
•2 subsets (empty, non-empty)
B
Notification
![Page 17: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/17.jpg)
Independent aspects
MP ≤ P ≤ D
“V” “U”
P < MP
“U” “V”
P > D
“A” “B” “A” “B”
A
0 -3% +2%+5% +1% 0
B
Notification
![Page 18: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/18.jpg)
Model ofthe SUT
Catalogue ofrequirements
Documentation analysis
Formalization of
requirements
Formulation coveragecriteria
Normativedocuments
Generationof test data
CRITERIA
- …- …- …- …
Coveragecriteria
Testset
![Page 19: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/19.jpg)
4. Generation of test data
Description ofDB scheme
Configuration
PineryTest set
Test setTest set
Test set
![Page 20: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/20.jpg)
Configuration of Pinery•Constraints on values of one field
– MP = { 6 }; – D = { 6, 30 }; – E = { "", "…@…" }; – P[MP<D] = {MP-1, MP, (MP+D)/2, D, D+1};– P[MP=D] = {MP - 1, D, D + 1};– CL[ P<MP ] = { "V", "U" };– CR[ P<MP ] = { "A" };– ….
![Page 21: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/21.jpg)
• Constraints on combination method for several fields– combinator( CREDITS ) =
Diagonal( Depend( Depend( Product(MP, D), P), Product(CL, CR) ),
E );
MP ≤ P ≤ D
“V” “U”
P < MP
“U” “V”
P > D
“A” “B” “A” “B”
A
0 -3% +2%+5% +1% 0
B
Notification
![Page 22: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/22.jpg)
Results
• Our method: 22 tuples• Cartesian product: 64 tuples
Economy increases if• possible values of fields ↗• number of independent aspects ↗
![Page 23: Test data generation for covering functionality of database applications](https://reader035.vdocuments.net/reader035/viewer/2022062501/56815dcb550346895dcbf7f7/html5/thumbnails/23.jpg)
Thank you !