SlideShare a Scribd company logo
1 of 32
1
Testing a Data-intensive System with
Generated Data Interactions
The Norwegian Customs and Excise Case Study
The Norwegian Customs and Excise Case Study
Sagar Sen and Arnaud Gotlieb
Certus V&V Center, Simula Research Laboratory
2
Outline
Motivation
Problem
Context
Faktum
Evaluation
3
The Heart of Norway’s E-governance:
TVINN
• 30,000 declarations/day, potentially
adhering to about 220,000 customs rules
• Customs rules typically accept/return
declarations based on information in the
declaration
• Norway first country in the world to use
UN’s EDIFACT brokerage standard
• 20% of Norway’s Economy (200 Billion
NOK/year or 25 billion Euros/year)
4
Daily Challenges for TVINN
• Accurate Computation of Taxes
5
Daily Challenges for TVINN
• Accurate Computation of Taxes
• Preventing criminal activities such
as mafia
Gross-weight > 2 x Net-
weight?
6
Daily Challenges for TVINN
• Accurate Computation of Taxes
• Preventing criminal activities such
as mafia
• Protecting people of Norway from
imports of hazardous substances
7
Daily Challenges Translates to Testing
• Accurate Computation of Taxes
• Preventing criminal activities such as mafia
• Protecting people of Norway from imports of hazardous substances
Testing TVINN
Are customs rules complete? Can they correctly detect
problems in declarations? Are there missing rules?
8
Behind the Scenes: Testing at Toll
Atle, Katrine,
Astrid, Odd
Large amounts of live data (up-to
30,000 customs
declarations/day)
Small team of test
managers
Testing
TVINN
9
Behind the Scenes: Testing at Toll
Is live data complete
for testing all
customs rules?
How long will it take to
test with all live data?
This is a lot of data,
can I select those
relevant to detect
bugs?
10
Can we automatically synthesize small test databases but
effective instead of using live data?
11
Outline
Motivation
Problem
Context
Faktum
Evaluation
12
Database defined by a schema
specified by
Database
Database Schema
(Eg. Norwegian Customs)
13
Modelling Test Database Configuration
Space with a Feature Model
Database
Tables
Fields
Field
Values
Invariants
CountryCode.CN requires Currency.CNY
CountryCode.CN requires CountryGroup.RCN
Database Configuration Space
14
Configuration to Test Database Population
Feature Model
Configuration of field
values
Database
INSERT INTO Declarations( Category ,
Direction, CountryCode , CurrencyCode )
VALUES ( 'FO' , ' I ' , 'US ' , 'CNY' ) ;
populates
to SQL
INSERT INTO Items( OriginCountry)
VALUES ( 'US' ) ;
...
15
Challenge
1. How to generate small test databases?
2. That satisfy test coverage criteria such as
combinatorial interaction coverage?
16
Outline
Motivation
Problem
Context
Faktum
Evaluation
17
Faktum
• Input is a feature model of database
variability, Schema,T (Eg.T=2 is pairwise)
• A tool to synthesize test databases
• That covers all T-wise combinatorial
interactions between a set of field values
• Uses the Alloy Analyzer API and
implemented in Java
18
Faktum
Step 1: Feature Model to Constraint Satisfaction
Problem in Alloy
one sig ProductConfigurations{ configurations : set
Configuration}sig Configuration{f1: lone Category_FO, f2: lone Category_EN,
...}
fact Invariant_Category_XOR{all c:Configuration|
#c.f9+#c.f10+#c.f11+#c.f12+#c.f13+#c.f14=1 }
Base Alloy Model
“Database field values are features in a config.”
“Invariants as facts”
“Set of configurations is set of tests”
“A configuration is a test case”
19
Step 2: Generating T-wise data interactions
FU USD
N/P N/P
N/P P
P N/P
P P
T=2, Pairwise Interactions
or Tuples
P=Present in database
N/P=Not Present in database
Faktum
Case study has 2582 pairwise tuples
(interactions)
20
Faktum
Step 3: Tuples of Interactions to Alloy
Predicates
pred tuple1
{all c:Configuration|#c.f1=0 and #c.f2=0}
pred tuple2
{all c:Configuration|#c.f1=0 and #c.f2=1}
pred tuple3
{all c:Configuration|#c.f1=1 and #c.f2=0}
pred tuple4
{all c:Configuration|#c.f1=1 and #c.f2=1}
FU USD
N/P N/P
N/P P
P N/P
P P
transform
Tuple Predicates
21
Faktum
Step 4: Checking Tuple Validity
pred tuple1
{all c:Configuration|#c.f1=0 and #c.f2=0}
pred tuple2
{all c:Configuration|#c.f1=0 and #c.f2=1}
pred tuple3
{all c:Configuration|#c.f1=1 and #c.f2=0}
pred tuple4
{all c:Configuration|#c.f1=1 and #c.f2=1}
Tuple Predicates
Base Alloy Model
Solution Exists?+
solve
Tuple Valid! Tuple Invalid!
Y N
“A fully parallelizable process”
22
Faktum
Step 5: Divide and Combine Strategy
A large number of interaction tuples gives a large number of predicates.
Solving all predicates in one Alloy constraint model is not tractable.
Valid Tuple
Predicates
Base Alloy
Tuple subsets
+
Base Alloy+
Base Alloy+
solve
solve
solve
divide combine
Configuration subsetsConfiguration
set
Perrouin, Sen, Baudry, Le Traon, Automate T-wise Test Generation for SPLs, ICST 2010
“One can explore different divide strategies”
23
Faktum
Step 6: Configuration to SQL
Configuration of field
values
Database
INSERT INTO Declarations( Category ,
Direction, CountryCode , CurrencyCode )
VALUES ( 'FO' , ' I ' , 'US ' , 'CNY' ) ;
populates
to SQL
Configuration Set
INSERT INTO Items...; INSERT INTO
Taxes;..
24
Faktum
Step 7: Generating updates for other fields
Database
completes
UPDATE INTO Declarations (CustomerID , Date , Sequence , Version , Amount ,
FeeAmount ,
TransportCost , ExchangeRate )
VALUES ( ' 2002542616 ' , ' 1965-3-29 ' , ' 1 ' , ' 1 ' , ' 2982.490245 ' , '
1343.471627 ' ,
' 79.0749637 ' , ' 112.7416998 ' ) ;
Basic strategy: Unique values for keys and random generation for other fields
25
Summary of Faktum’s Approach
26
Outline
Motivation
Problem
Context
Faktum
Evaluation
27
Case Study: Norwegian Toll Customs
Test scenario: Imports from Brazil,
Chine, India, and USA
28
Case Study: Norwegian Toll Customs
37 terminal field values with 2582 pairwise
interactions
Faktum
935 Configurations
...
29
Scalability to Check TupleValidity
Measured using perf4J every 10 seconds
30
Scalability of Configuration Generation
1. 935 configurations required 6803 calls to the Alloy SAT solver
2. Divide-and-combine gives an average of 400 ms per call to solver
31
Conclusion and Future Work
1. We represent variability in test databases as a feature model.
2. Faktum, a tool to synthesize test databases covering T-wise
combinatorial interactions between database field values.
3. We apply Faktum to generate compact test databases for the
Norwegian Customs and Excise Dept.
4. Faktum is scalable due to a divide-and-combine strategy
Future Work
1. We are thinking about a better representation of database variability
2. A multi-processor parallelized implementation of Faktum for fast
generation (not just scalable)
32
Thank you, ?s

More Related Content

Similar to Sagar sen caise2013final

Validating statistical Index Data represented in RDF using SPARQL Queries: Co...
Validating statistical Index Data represented in RDF using SPARQL Queries: Co...Validating statistical Index Data represented in RDF using SPARQL Queries: Co...
Validating statistical Index Data represented in RDF using SPARQL Queries: Co...Jose Emilio Labra Gayo
 
Example-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud DetectionExample-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud DetectionAlejandro Correa Bahnsen, PhD
 
Metrics ekon 14_2_kleiner
Metrics ekon 14_2_kleinerMetrics ekon 14_2_kleiner
Metrics ekon 14_2_kleinerMax Kleiner
 
Techniques for Running Large Numbers of Scenarios in TIMES
Techniques for Running Large Numbers of Scenarios in TIMESTechniques for Running Large Numbers of Scenarios in TIMES
Techniques for Running Large Numbers of Scenarios in TIMESIEA-ETSAP
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolioeileensauer
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolioeileensauer
 
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave ClubJoining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave ClubData Con LA
 
Capturing and Analyzing Legal Requirements
Capturing and Analyzing Legal RequirementsCapturing and Analyzing Legal Requirements
Capturing and Analyzing Legal RequirementsLionel Briand
 
Representing verifiable statistical index computations as linked data
Representing verifiable statistical index computations as linked dataRepresenting verifiable statistical index computations as linked data
Representing verifiable statistical index computations as linked dataJose Emilio Labra Gayo
 
Vancouver Canada MuleSoft Meetup Nov 2020
Vancouver Canada MuleSoft Meetup Nov 2020Vancouver Canada MuleSoft Meetup Nov 2020
Vancouver Canada MuleSoft Meetup Nov 2020Yashwant Palkar
 
AI for PM.pptx
AI for PM.pptxAI for PM.pptx
AI for PM.pptxNatan Katz
 
Portfolio For Charles Tontz
Portfolio For Charles TontzPortfolio For Charles Tontz
Portfolio For Charles Tontzctontz
 
PART IUse the OLTP logical schema below to build data warehou.docx
PART IUse the OLTP logical schema below to build data warehou.docxPART IUse the OLTP logical schema below to build data warehou.docx
PART IUse the OLTP logical schema below to build data warehou.docxkarlhennesey
 
Indian Export Data, Indian Export Ports, India Export Custom Duty
Indian Export Data, Indian Export Ports, India Export Custom Duty Indian Export Data, Indian Export Ports, India Export Custom Duty
Indian Export Data, Indian Export Ports, India Export Custom Duty Seair Exim Solution
 
Corporate valuation
Corporate valuation Corporate valuation
Corporate valuation RudreshSamant
 
A process to improve the accuracy of mk ii fp to cosmic charles symons
A process to improve the accuracy of mk ii fp to cosmic    charles symonsA process to improve the accuracy of mk ii fp to cosmic    charles symons
A process to improve the accuracy of mk ii fp to cosmic charles symonsIWSM Mensura
 
Juan Carlos Cuestas. The Great (De)leveraging in the GIIPS countries. Foreign...
Juan Carlos Cuestas. The Great (De)leveraging in the GIIPS countries. Foreign...Juan Carlos Cuestas. The Great (De)leveraging in the GIIPS countries. Foreign...
Juan Carlos Cuestas. The Great (De)leveraging in the GIIPS countries. Foreign...Eesti Pank
 

Similar to Sagar sen caise2013final (20)

Validating statistical Index Data represented in RDF using SPARQL Queries: Co...
Validating statistical Index Data represented in RDF using SPARQL Queries: Co...Validating statistical Index Data represented in RDF using SPARQL Queries: Co...
Validating statistical Index Data represented in RDF using SPARQL Queries: Co...
 
Nivethitha_Murex and Manual Testing_7 yrs
Nivethitha_Murex and Manual Testing_7 yrsNivethitha_Murex and Manual Testing_7 yrs
Nivethitha_Murex and Manual Testing_7 yrs
 
Example-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud DetectionExample-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud Detection
 
Metrics ekon 14_2_kleiner
Metrics ekon 14_2_kleinerMetrics ekon 14_2_kleiner
Metrics ekon 14_2_kleiner
 
Techniques for Running Large Numbers of Scenarios in TIMES
Techniques for Running Large Numbers of Scenarios in TIMESTechniques for Running Large Numbers of Scenarios in TIMES
Techniques for Running Large Numbers of Scenarios in TIMES
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave ClubJoining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
 
Capturing and Analyzing Legal Requirements
Capturing and Analyzing Legal RequirementsCapturing and Analyzing Legal Requirements
Capturing and Analyzing Legal Requirements
 
Representing verifiable statistical index computations as linked data
Representing verifiable statistical index computations as linked dataRepresenting verifiable statistical index computations as linked data
Representing verifiable statistical index computations as linked data
 
Dynamic Actions On Steroids
Dynamic Actions On SteroidsDynamic Actions On Steroids
Dynamic Actions On Steroids
 
Vancouver Canada MuleSoft Meetup Nov 2020
Vancouver Canada MuleSoft Meetup Nov 2020Vancouver Canada MuleSoft Meetup Nov 2020
Vancouver Canada MuleSoft Meetup Nov 2020
 
AI for PM.pptx
AI for PM.pptxAI for PM.pptx
AI for PM.pptx
 
Portfolio For Charles Tontz
Portfolio For Charles TontzPortfolio For Charles Tontz
Portfolio For Charles Tontz
 
Costing
CostingCosting
Costing
 
PART IUse the OLTP logical schema below to build data warehou.docx
PART IUse the OLTP logical schema below to build data warehou.docxPART IUse the OLTP logical schema below to build data warehou.docx
PART IUse the OLTP logical schema below to build data warehou.docx
 
Indian Export Data, Indian Export Ports, India Export Custom Duty
Indian Export Data, Indian Export Ports, India Export Custom Duty Indian Export Data, Indian Export Ports, India Export Custom Duty
Indian Export Data, Indian Export Ports, India Export Custom Duty
 
Corporate valuation
Corporate valuation Corporate valuation
Corporate valuation
 
A process to improve the accuracy of mk ii fp to cosmic charles symons
A process to improve the accuracy of mk ii fp to cosmic    charles symonsA process to improve the accuracy of mk ii fp to cosmic    charles symons
A process to improve the accuracy of mk ii fp to cosmic charles symons
 
Juan Carlos Cuestas. The Great (De)leveraging in the GIIPS countries. Foreign...
Juan Carlos Cuestas. The Great (De)leveraging in the GIIPS countries. Foreign...Juan Carlos Cuestas. The Great (De)leveraging in the GIIPS countries. Foreign...
Juan Carlos Cuestas. The Great (De)leveraging in the GIIPS countries. Foreign...
 

More from caise2013vlc

Henning agt talk-caise-semnet
Henning agt   talk-caise-semnetHenning agt   talk-caise-semnet
Henning agt talk-caise-semnetcaise2013vlc
 
Michael mrissa c aise
Michael mrissa c aiseMichael mrissa c aise
Michael mrissa c aisecaise2013vlc
 
Razvan petrusel presentation caise 2013
Razvan petrusel   presentation caise 2013Razvan petrusel   presentation caise 2013
Razvan petrusel presentation caise 2013caise2013vlc
 
Ramezani taghiabadi temporal compliance checking 2
Ramezani taghiabadi   temporal compliance checking 2Ramezani taghiabadi   temporal compliance checking 2
Ramezani taghiabadi temporal compliance checking 2caise2013vlc
 
Ferreira c ai-se2013-final-handouts
Ferreira   c ai-se2013-final-handoutsFerreira   c ai-se2013-final-handouts
Ferreira c ai-se2013-final-handoutscaise2013vlc
 
Sonja meyer caise 2013
Sonja meyer caise 2013Sonja meyer caise 2013
Sonja meyer caise 2013caise2013vlc
 
Tony clark caise 13-presentation
Tony clark  caise 13-presentationTony clark  caise 13-presentation
Tony clark caise 13-presentationcaise2013vlc
 
Miguel goulao 2013 c-aise
Miguel goulao 2013 c-aiseMiguel goulao 2013 c-aise
Miguel goulao 2013 c-aisecaise2013vlc
 
Jorge cardoso caise-usdl-tosca-2013-06-18c
Jorge cardoso   caise-usdl-tosca-2013-06-18cJorge cardoso   caise-usdl-tosca-2013-06-18c
Jorge cardoso caise-usdl-tosca-2013-06-18ccaise2013vlc
 
Kerrstin klemishc c-aise2013_
Kerrstin klemishc c-aise2013_Kerrstin klemishc c-aise2013_
Kerrstin klemishc c-aise2013_caise2013vlc
 
Ignacio panach ormeño et-al_caise2013
Ignacio panach   ormeño et-al_caise2013Ignacio panach   ormeño et-al_caise2013
Ignacio panach ormeño et-al_caise2013caise2013vlc
 
Peter sawyer caise
Peter sawyer  caisePeter sawyer  caise
Peter sawyer caisecaise2013vlc
 
Malinda scalability c_ai_se_2013_v3
Malinda scalability c_ai_se_2013_v3Malinda scalability c_ai_se_2013_v3
Malinda scalability c_ai_se_2013_v3caise2013vlc
 
Maurino andrea coopetitivecaise2013
Maurino andrea   coopetitivecaise2013Maurino andrea   coopetitivecaise2013
Maurino andrea coopetitivecaise2013caise2013vlc
 
Moe wynn caise13 presentation
Moe wynn   caise13 presentationMoe wynn   caise13 presentation
Moe wynn caise13 presentationcaise2013vlc
 
Tommi kramer 2013-06-21-caise-re2-kramer
Tommi kramer   2013-06-21-caise-re2-kramerTommi kramer   2013-06-21-caise-re2-kramer
Tommi kramer 2013-06-21-caise-re2-kramercaise2013vlc
 
Canovas cabot topublish-caise2013-
Canovas cabot topublish-caise2013-Canovas cabot topublish-caise2013-
Canovas cabot topublish-caise2013-caise2013vlc
 
Christoph scuetz caise bmo-olap_2013
Christoph scuetz caise bmo-olap_2013Christoph scuetz caise bmo-olap_2013
Christoph scuetz caise bmo-olap_2013caise2013vlc
 

More from caise2013vlc (20)

Henning agt talk-caise-semnet
Henning agt   talk-caise-semnetHenning agt   talk-caise-semnet
Henning agt talk-caise-semnet
 
Michael mrissa c aise
Michael mrissa c aiseMichael mrissa c aise
Michael mrissa c aise
 
Razvan petrusel presentation caise 2013
Razvan petrusel   presentation caise 2013Razvan petrusel   presentation caise 2013
Razvan petrusel presentation caise 2013
 
Ramezani taghiabadi temporal compliance checking 2
Ramezani taghiabadi   temporal compliance checking 2Ramezani taghiabadi   temporal compliance checking 2
Ramezani taghiabadi temporal compliance checking 2
 
Ferreira c ai-se2013-final-handouts
Ferreira   c ai-se2013-final-handoutsFerreira   c ai-se2013-final-handouts
Ferreira c ai-se2013-final-handouts
 
Sonja meyer caise 2013
Sonja meyer caise 2013Sonja meyer caise 2013
Sonja meyer caise 2013
 
Tony clark caise 13-presentation
Tony clark  caise 13-presentationTony clark  caise 13-presentation
Tony clark caise 13-presentation
 
Miguel goulao 2013 c-aise
Miguel goulao 2013 c-aiseMiguel goulao 2013 c-aise
Miguel goulao 2013 c-aise
 
Jorge cardoso caise-usdl-tosca-2013-06-18c
Jorge cardoso   caise-usdl-tosca-2013-06-18cJorge cardoso   caise-usdl-tosca-2013-06-18c
Jorge cardoso caise-usdl-tosca-2013-06-18c
 
Kerrstin klemishc c-aise2013_
Kerrstin klemishc c-aise2013_Kerrstin klemishc c-aise2013_
Kerrstin klemishc c-aise2013_
 
Ignacio panach ormeño et-al_caise2013
Ignacio panach   ormeño et-al_caise2013Ignacio panach   ormeño et-al_caise2013
Ignacio panach ormeño et-al_caise2013
 
Peter sawyer caise
Peter sawyer  caisePeter sawyer  caise
Peter sawyer caise
 
Scekic caise13-
Scekic caise13-Scekic caise13-
Scekic caise13-
 
Malinda scalability c_ai_se_2013_v3
Malinda scalability c_ai_se_2013_v3Malinda scalability c_ai_se_2013_v3
Malinda scalability c_ai_se_2013_v3
 
Maurino andrea coopetitivecaise2013
Maurino andrea   coopetitivecaise2013Maurino andrea   coopetitivecaise2013
Maurino andrea coopetitivecaise2013
 
Moe wynn caise13 presentation
Moe wynn   caise13 presentationMoe wynn   caise13 presentation
Moe wynn caise13 presentation
 
Jian yu caise13-
Jian yu caise13-Jian yu caise13-
Jian yu caise13-
 
Tommi kramer 2013-06-21-caise-re2-kramer
Tommi kramer   2013-06-21-caise-re2-kramerTommi kramer   2013-06-21-caise-re2-kramer
Tommi kramer 2013-06-21-caise-re2-kramer
 
Canovas cabot topublish-caise2013-
Canovas cabot topublish-caise2013-Canovas cabot topublish-caise2013-
Canovas cabot topublish-caise2013-
 
Christoph scuetz caise bmo-olap_2013
Christoph scuetz caise bmo-olap_2013Christoph scuetz caise bmo-olap_2013
Christoph scuetz caise bmo-olap_2013
 

Recently uploaded

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Recently uploaded (20)

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

Sagar sen caise2013final

  • 1. 1 Testing a Data-intensive System with Generated Data Interactions The Norwegian Customs and Excise Case Study The Norwegian Customs and Excise Case Study Sagar Sen and Arnaud Gotlieb Certus V&V Center, Simula Research Laboratory
  • 3. 3 The Heart of Norway’s E-governance: TVINN • 30,000 declarations/day, potentially adhering to about 220,000 customs rules • Customs rules typically accept/return declarations based on information in the declaration • Norway first country in the world to use UN’s EDIFACT brokerage standard • 20% of Norway’s Economy (200 Billion NOK/year or 25 billion Euros/year)
  • 4. 4 Daily Challenges for TVINN • Accurate Computation of Taxes
  • 5. 5 Daily Challenges for TVINN • Accurate Computation of Taxes • Preventing criminal activities such as mafia Gross-weight > 2 x Net- weight?
  • 6. 6 Daily Challenges for TVINN • Accurate Computation of Taxes • Preventing criminal activities such as mafia • Protecting people of Norway from imports of hazardous substances
  • 7. 7 Daily Challenges Translates to Testing • Accurate Computation of Taxes • Preventing criminal activities such as mafia • Protecting people of Norway from imports of hazardous substances Testing TVINN Are customs rules complete? Can they correctly detect problems in declarations? Are there missing rules?
  • 8. 8 Behind the Scenes: Testing at Toll Atle, Katrine, Astrid, Odd Large amounts of live data (up-to 30,000 customs declarations/day) Small team of test managers Testing TVINN
  • 9. 9 Behind the Scenes: Testing at Toll Is live data complete for testing all customs rules? How long will it take to test with all live data? This is a lot of data, can I select those relevant to detect bugs?
  • 10. 10 Can we automatically synthesize small test databases but effective instead of using live data?
  • 12. 12 Database defined by a schema specified by Database Database Schema (Eg. Norwegian Customs)
  • 13. 13 Modelling Test Database Configuration Space with a Feature Model Database Tables Fields Field Values Invariants CountryCode.CN requires Currency.CNY CountryCode.CN requires CountryGroup.RCN Database Configuration Space
  • 14. 14 Configuration to Test Database Population Feature Model Configuration of field values Database INSERT INTO Declarations( Category , Direction, CountryCode , CurrencyCode ) VALUES ( 'FO' , ' I ' , 'US ' , 'CNY' ) ; populates to SQL INSERT INTO Items( OriginCountry) VALUES ( 'US' ) ; ...
  • 15. 15 Challenge 1. How to generate small test databases? 2. That satisfy test coverage criteria such as combinatorial interaction coverage?
  • 17. 17 Faktum • Input is a feature model of database variability, Schema,T (Eg.T=2 is pairwise) • A tool to synthesize test databases • That covers all T-wise combinatorial interactions between a set of field values • Uses the Alloy Analyzer API and implemented in Java
  • 18. 18 Faktum Step 1: Feature Model to Constraint Satisfaction Problem in Alloy one sig ProductConfigurations{ configurations : set Configuration}sig Configuration{f1: lone Category_FO, f2: lone Category_EN, ...} fact Invariant_Category_XOR{all c:Configuration| #c.f9+#c.f10+#c.f11+#c.f12+#c.f13+#c.f14=1 } Base Alloy Model “Database field values are features in a config.” “Invariants as facts” “Set of configurations is set of tests” “A configuration is a test case”
  • 19. 19 Step 2: Generating T-wise data interactions FU USD N/P N/P N/P P P N/P P P T=2, Pairwise Interactions or Tuples P=Present in database N/P=Not Present in database Faktum Case study has 2582 pairwise tuples (interactions)
  • 20. 20 Faktum Step 3: Tuples of Interactions to Alloy Predicates pred tuple1 {all c:Configuration|#c.f1=0 and #c.f2=0} pred tuple2 {all c:Configuration|#c.f1=0 and #c.f2=1} pred tuple3 {all c:Configuration|#c.f1=1 and #c.f2=0} pred tuple4 {all c:Configuration|#c.f1=1 and #c.f2=1} FU USD N/P N/P N/P P P N/P P P transform Tuple Predicates
  • 21. 21 Faktum Step 4: Checking Tuple Validity pred tuple1 {all c:Configuration|#c.f1=0 and #c.f2=0} pred tuple2 {all c:Configuration|#c.f1=0 and #c.f2=1} pred tuple3 {all c:Configuration|#c.f1=1 and #c.f2=0} pred tuple4 {all c:Configuration|#c.f1=1 and #c.f2=1} Tuple Predicates Base Alloy Model Solution Exists?+ solve Tuple Valid! Tuple Invalid! Y N “A fully parallelizable process”
  • 22. 22 Faktum Step 5: Divide and Combine Strategy A large number of interaction tuples gives a large number of predicates. Solving all predicates in one Alloy constraint model is not tractable. Valid Tuple Predicates Base Alloy Tuple subsets + Base Alloy+ Base Alloy+ solve solve solve divide combine Configuration subsetsConfiguration set Perrouin, Sen, Baudry, Le Traon, Automate T-wise Test Generation for SPLs, ICST 2010 “One can explore different divide strategies”
  • 23. 23 Faktum Step 6: Configuration to SQL Configuration of field values Database INSERT INTO Declarations( Category , Direction, CountryCode , CurrencyCode ) VALUES ( 'FO' , ' I ' , 'US ' , 'CNY' ) ; populates to SQL Configuration Set INSERT INTO Items...; INSERT INTO Taxes;..
  • 24. 24 Faktum Step 7: Generating updates for other fields Database completes UPDATE INTO Declarations (CustomerID , Date , Sequence , Version , Amount , FeeAmount , TransportCost , ExchangeRate ) VALUES ( ' 2002542616 ' , ' 1965-3-29 ' , ' 1 ' , ' 1 ' , ' 2982.490245 ' , ' 1343.471627 ' , ' 79.0749637 ' , ' 112.7416998 ' ) ; Basic strategy: Unique values for keys and random generation for other fields
  • 27. 27 Case Study: Norwegian Toll Customs Test scenario: Imports from Brazil, Chine, India, and USA
  • 28. 28 Case Study: Norwegian Toll Customs 37 terminal field values with 2582 pairwise interactions Faktum 935 Configurations ...
  • 29. 29 Scalability to Check TupleValidity Measured using perf4J every 10 seconds
  • 30. 30 Scalability of Configuration Generation 1. 935 configurations required 6803 calls to the Alloy SAT solver 2. Divide-and-combine gives an average of 400 ms per call to solver
  • 31. 31 Conclusion and Future Work 1. We represent variability in test databases as a feature model. 2. Faktum, a tool to synthesize test databases covering T-wise combinatorial interactions between database field values. 3. We apply Faktum to generate compact test databases for the Norwegian Customs and Excise Dept. 4. Faktum is scalable due to a divide-and-combine strategy Future Work 1. We are thinking about a better representation of database variability 2. A multi-processor parallelized implementation of Faktum for fast generation (not just scalable)

Editor's Notes

  1. TVINN is a sophisticated software system that processes about 30,000 customs declarations making sure they adhere to more than 100,000 customs rules. Customs rules basically accept or reject declarations using information in it. Incidentally, Norway is a pioneer in E-governance being the first country in the world to use EDIFACT brokerage. A UN standard for exchange of business message. Its in widespread today. The TVINN system is TVINN plays a key role in inching towards a corruption free society.
  2. There are three principal challenges for Toll and in particular TVINN. The first one is the accurate computation of taxes. Some errors in computing taxes could hurt the public image
  3. Second is detecting and preventing criminal activities such as mafia. For instance, if Gross-weight ? two times net weigh then something is fishy. Could there be something else in the packaging. Of course, a lot of prevention is done manually, but TVINN is certainly capable of raising alerts when numerical values look suspicious.
  4. Third challenge is to protect the people of Norway. People seldom would import a gun or a bomb into Norway but may import the key elements to making one. Information about declarations in TVINN can help detect such patterns.
  5. These daily challenges largely translate to Testing of TVINN. Testing TVINN entails asking questions such as : are customs rules complete? can they correctly detect problems in declarations? Are there missing rules?
  6. So who does it? There is a team of very efficient and experience test managers at Toll Customs Norway. We are pleased to have Katrine Langset with us in the audience. A small team behind the scenes ensures that new rules are well tested and robust for a flurry of 30,000 incoming declarations the next day.
  7. So who does it? There is a team of very efficient and experience test managers at Toll Customs Norway. We are pleased to have Katrine Langset with us in the audience. A small team behind the scenes ensures that new rules are well tested and robust for a flurry of 30,000 incoming declarations the next day.
  8. So at Certus we asked ourselves. How can we automate steps for our test managers to improve the quality of TVINN,save them time, and increase their understandability of the system.
  9. So at Certus we asked ourselves. How can we automate steps for our test managers to improve the quality of TVINN,save them time, and increase their understandability of the system.