SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Why do we care about the data used by
the system under test?
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Data Strategies
PAUL MERRILL
@dpaulmerrill
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Agenda
Define Terms
Identify Constraints
Walk Through Examples
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Define Terms
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Define Terms
Data Strategy - the combination of code,
procedure and infrastructure that affect how
tests interact with data to stimulate the
System Under Test (SUT).
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Define Terms
Signed Data - data which has been
modified so that it is easily recognizable.
For example, an account with a user name
like “TestUser” or an email address like
“automated@testing.com”
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Define Terms
Constraint - a characteristic that applies a
force in a way that is limiting to an
automated test or its environment.
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Define Terms
Constraints factor down to:
Policy
Cost
Test Expectations
Infrastructure
People
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Identify Constraints
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Examples of Constraints
Shared Environment
– Cost
– Policy
– Infrastructure
Downtime
– Policy
– Cost
– People
Technical Skills
– Cost
– People
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Examples of Constraints
Data Source Growth
– Cost
– Policy
– Infrastructure
Repeatable Tests
– Policy
– Test Expectations
– People
– Infrastructure
Data Variance
– Policy
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Example Data Strategies
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Strategies Have 2 Parts:
Creational Strategy - how and when data
is created.
Cleanup Strategy - the method by which
a data source is returned to a benign
state.
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Elementary Approach
Creation - Tests assume specific data in
SUT - no creational strategy
Clean up - No clean-up strategy, no
management of data
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Elementary Approach
SUT
Execution 1
Execution 2
Execution 3
Data
Source
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Elementary Approach
Pros:
Simple
No implementation
(quick)
Cons:
Tests are not
repeatable
No isolation of data
Does not work on
different systems
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Refresh Data Source Approach
Creation - Tests assume specific data in
SUT
Cleanup - Data managed by refreshing the
data source prior to test execution
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Refresh Data Source Approach
SUT
Execution 1
Data
Source
Refresh
Execution 2
Refresh
Execution 3
Refresh
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Refresh Data Source Approach
Pros:
Clean test bed (data-
wise) per test
Uniform, one-size-fits-
all process
No variance of data
Less time/cost to
implement
Total control of data
Cons:
Timely
Requires Downtime
Blocks shared
environments
No variance of data
Stale data over time
Doesn’t work on
different systems
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Selfish Data Generation
Creation - Tests create the data they need
in SUT
Clean up - No management of data after
generation
May be random (e.g. via Faker)
Create with batch process or in test
Create via SUT or directly in Data Source
Create In-test or pre-test
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Selfish Data Generation
SUT
Execution 1
Execution 2
Execution 3
Data
Source
Generate Data
Generate Data
Generate Data
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Selfish Data Generation
Pros:
Unique data per test
Does not block shared
environments
No downtime
No stale data
Tests can run anywhere
Tests become
repeatable
Cons:
Unchecked growth of
data source
Requires understanding
of data model
Tests need to know
about data
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Data Generation & Batch Cleanup
Creation - Data generated for each test
Cleanup - Data cleaned up after test run
Clean up may happen in data source or
via SUT
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Data Generation & Batch Cleanup
SUT
Execution 1
Execution 2
Execution 3
Data
Source
Generate Data
Generate Data
Generate Data
Batch Clean up
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Data Generation & Batch Cleanup
Pros:
Unique data per test
Does not block shared
environments
Minimal downtime
No stale data
Growth of data source
kept in check
Tests run anywhere
Tests are repeatable
Cons:
Requires deep
understanding of data
model
Must know what to clean
Significant scaffolding
must be created
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Data Generation & Immediate Cleanup
Creation - tests generate their own data
Clean up - for each test case immediately
after execution
Uses a TearDown method supplied by the
framework
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Data Generation & Immediate Cleanup
SUT
Execution 1
Execution 2
Execution 3
Data
Source
Generate Data
Generate Data
Generate Data
Clean up
Clean up
Clean up
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Data Generation & Immediate Cleanup
Pros:
Tests are repeatable
Unique data per test
Does not block shared
environments
Minimal downtime
No stale data
Growth of data source kept in
check
No data left over from other
tests
Tests run anywhere
Cons:
Requires deep
understanding of data model
Must know what to clean
Significant scaffolding must
be created
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Creational Strategies
Elementary Refreshed Data
Source
Data Generation
Shared
Environment
Low Downtime
Repeatable
Tests
Data Variance
Minimal Data
Growth
Significant
Technical Skills
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Cleanup Strategies
Elementary
(none)
Refresh
Data
Source
Batch Immediate (Signed,
Marked or Persisted)
Shared
Environment
Low
Downtime
Repeatable
Tests
Strong
Technical
Skills
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
How do we know what data to
clean up?
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Signed Data
Record Name: “test_21323”
Field Name: “Record Name”
Format: “test_<random5digs>”
Persist in:
– a data source
– code
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Marked Data
An “isTestData” field or
Data that is otherwise known to be test
data because of its format or type, for
example:
– A “test user” created it
– Linked to known test denotation
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Internally Persisted Data
Keep a list in memory:
– userIds:
• 12312
• 4322
• 23423
– emailIds:
• 12312
• 423423
• 234
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Externally Persisted Data
Keep a record in a data source:
– userIds:
• 12312
• 4322
• 23423
– emailIds:
• 12312
• 423423
• 234
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
In Review
Defined Terms
Identified Constraints
Walked Through Examples
www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved
Thank you!
PAUL MERRILL
@dpaulmerrill

Contenu connexe

Similaire à Data Strategies in Testing

Information Flow Mechanism in Data warehouse
Information Flow Mechanism in Data warehouseInformation Flow Mechanism in Data warehouse
Information Flow Mechanism in Data warehouseGunjanShree1
 
Whose fault is it? - a review of application tuning problems
Whose fault is it? - a review of application tuning problemsWhose fault is it? - a review of application tuning problems
Whose fault is it? - a review of application tuning problemsSage Computing Services
 
Performance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and ApexPerformance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and ApexSalesforce Developers
 
Data integrity cGMP requirements
Data integrity  cGMP  requirementsData integrity  cGMP  requirements
Data integrity cGMP requirementsShamik (Sam) Pandit
 
Presentation on data integrity in Pharmaceutical Industry
Presentation on data integrity in Pharmaceutical IndustryPresentation on data integrity in Pharmaceutical Industry
Presentation on data integrity in Pharmaceutical IndustrySathish Vemula
 
Failure analysis buisness impact-backup-archive
Failure analysis buisness impact-backup-archiveFailure analysis buisness impact-backup-archive
Failure analysis buisness impact-backup-archiveDavin Abraham
 
MetaSuite and_hp_quality_center_enterprise
MetaSuite and_hp_quality_center_enterpriseMetaSuite and_hp_quality_center_enterprise
MetaSuite and_hp_quality_center_enterpriseMinerva SoftCare GmbH
 
Reversing Engineering a Web Application - For fun, behavior and detection
Reversing Engineering a Web Application - For fun, behavior and detectionReversing Engineering a Web Application - For fun, behavior and detection
Reversing Engineering a Web Application - For fun, behavior and detectionRodrigo Montoro
 
Mind Map Test Data Management Overview
Mind Map Test Data Management OverviewMind Map Test Data Management Overview
Mind Map Test Data Management Overviewdublinx
 
Pre-Con Ed: Managing Test Data Across Distributed and Mainframe Systems
Pre-Con Ed: Managing Test Data Across Distributed and Mainframe SystemsPre-Con Ed: Managing Test Data Across Distributed and Mainframe Systems
Pre-Con Ed: Managing Test Data Across Distributed and Mainframe SystemsCA Technologies
 
Preparing for GDPR
Preparing for GDPRPreparing for GDPR
Preparing for GDPRGenRocket
 
Automation – Way Forward to Achieve Data Integrity
Automation – Way Forward to Achieve Data IntegrityAutomation – Way Forward to Achieve Data Integrity
Automation – Way Forward to Achieve Data IntegrityMukunth Venkatesan
 
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial ModernizationMuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial ModernizationJitendra Bafna
 
DP-203T00 Microsoft Azure Data Engineering-08.pptx
DP-203T00 Microsoft Azure Data Engineering-08.pptxDP-203T00 Microsoft Azure Data Engineering-08.pptx
DP-203T00 Microsoft Azure Data Engineering-08.pptxssuser45b0e7
 
Merging and Migrating: Data Portability from the Trenches
Merging and Migrating: Data Portability from the TrenchesMerging and Migrating: Data Portability from the Trenches
Merging and Migrating: Data Portability from the TrenchesAtlassian
 
Techniques for effective test data management in test automation.pptx
Techniques for effective test data management in test automation.pptxTechniques for effective test data management in test automation.pptx
Techniques for effective test data management in test automation.pptxKnoldus Inc.
 
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeology
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeologyWindows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeology
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeologyMichael Gough
 

Similaire à Data Strategies in Testing (20)

Information Flow Mechanism in Data warehouse
Information Flow Mechanism in Data warehouseInformation Flow Mechanism in Data warehouse
Information Flow Mechanism in Data warehouse
 
ETL Process
ETL ProcessETL Process
ETL Process
 
Whose fault is it? - a review of application tuning problems
Whose fault is it? - a review of application tuning problemsWhose fault is it? - a review of application tuning problems
Whose fault is it? - a review of application tuning problems
 
Performance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and ApexPerformance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and Apex
 
Data integrity cGMP requirements
Data integrity  cGMP  requirementsData integrity  cGMP  requirements
Data integrity cGMP requirements
 
Presentation on data integrity in Pharmaceutical Industry
Presentation on data integrity in Pharmaceutical IndustryPresentation on data integrity in Pharmaceutical Industry
Presentation on data integrity in Pharmaceutical Industry
 
Failure analysis buisness impact-backup-archive
Failure analysis buisness impact-backup-archiveFailure analysis buisness impact-backup-archive
Failure analysis buisness impact-backup-archive
 
Data integrity
Data integrityData integrity
Data integrity
 
MetaSuite and_hp_quality_center_enterprise
MetaSuite and_hp_quality_center_enterpriseMetaSuite and_hp_quality_center_enterprise
MetaSuite and_hp_quality_center_enterprise
 
Reversing Engineering a Web Application - For fun, behavior and detection
Reversing Engineering a Web Application - For fun, behavior and detectionReversing Engineering a Web Application - For fun, behavior and detection
Reversing Engineering a Web Application - For fun, behavior and detection
 
Large Data Management Strategies
Large Data Management StrategiesLarge Data Management Strategies
Large Data Management Strategies
 
Mind Map Test Data Management Overview
Mind Map Test Data Management OverviewMind Map Test Data Management Overview
Mind Map Test Data Management Overview
 
Pre-Con Ed: Managing Test Data Across Distributed and Mainframe Systems
Pre-Con Ed: Managing Test Data Across Distributed and Mainframe SystemsPre-Con Ed: Managing Test Data Across Distributed and Mainframe Systems
Pre-Con Ed: Managing Test Data Across Distributed and Mainframe Systems
 
Preparing for GDPR
Preparing for GDPRPreparing for GDPR
Preparing for GDPR
 
Automation – Way Forward to Achieve Data Integrity
Automation – Way Forward to Achieve Data IntegrityAutomation – Way Forward to Achieve Data Integrity
Automation – Way Forward to Achieve Data Integrity
 
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial ModernizationMuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
 
DP-203T00 Microsoft Azure Data Engineering-08.pptx
DP-203T00 Microsoft Azure Data Engineering-08.pptxDP-203T00 Microsoft Azure Data Engineering-08.pptx
DP-203T00 Microsoft Azure Data Engineering-08.pptx
 
Merging and Migrating: Data Portability from the Trenches
Merging and Migrating: Data Portability from the TrenchesMerging and Migrating: Data Portability from the Trenches
Merging and Migrating: Data Portability from the Trenches
 
Techniques for effective test data management in test automation.pptx
Techniques for effective test data management in test automation.pptxTechniques for effective test data management in test automation.pptx
Techniques for effective test data management in test automation.pptx
 
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeology
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeologyWindows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeology
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeology
 

Dernier

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 

Dernier (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

Data Strategies in Testing

  • 1. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Why do we care about the data used by the system under test?
  • 2. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Data Strategies PAUL MERRILL @dpaulmerrill
  • 3. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Agenda Define Terms Identify Constraints Walk Through Examples
  • 4. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Define Terms
  • 5. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Define Terms Data Strategy - the combination of code, procedure and infrastructure that affect how tests interact with data to stimulate the System Under Test (SUT).
  • 6. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Define Terms Signed Data - data which has been modified so that it is easily recognizable. For example, an account with a user name like “TestUser” or an email address like “automated@testing.com”
  • 7. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Define Terms Constraint - a characteristic that applies a force in a way that is limiting to an automated test or its environment.
  • 8. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Define Terms Constraints factor down to: Policy Cost Test Expectations Infrastructure People
  • 9. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Identify Constraints
  • 10. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Examples of Constraints Shared Environment – Cost – Policy – Infrastructure Downtime – Policy – Cost – People Technical Skills – Cost – People
  • 11. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Examples of Constraints Data Source Growth – Cost – Policy – Infrastructure Repeatable Tests – Policy – Test Expectations – People – Infrastructure Data Variance – Policy
  • 12. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Example Data Strategies
  • 13. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Strategies Have 2 Parts: Creational Strategy - how and when data is created. Cleanup Strategy - the method by which a data source is returned to a benign state.
  • 14. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Elementary Approach Creation - Tests assume specific data in SUT - no creational strategy Clean up - No clean-up strategy, no management of data
  • 15. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Elementary Approach SUT Execution 1 Execution 2 Execution 3 Data Source
  • 16. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Elementary Approach Pros: Simple No implementation (quick) Cons: Tests are not repeatable No isolation of data Does not work on different systems
  • 17. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Refresh Data Source Approach Creation - Tests assume specific data in SUT Cleanup - Data managed by refreshing the data source prior to test execution
  • 18. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Refresh Data Source Approach SUT Execution 1 Data Source Refresh Execution 2 Refresh Execution 3 Refresh
  • 19. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Refresh Data Source Approach Pros: Clean test bed (data- wise) per test Uniform, one-size-fits- all process No variance of data Less time/cost to implement Total control of data Cons: Timely Requires Downtime Blocks shared environments No variance of data Stale data over time Doesn’t work on different systems
  • 20. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Selfish Data Generation Creation - Tests create the data they need in SUT Clean up - No management of data after generation May be random (e.g. via Faker) Create with batch process or in test Create via SUT or directly in Data Source Create In-test or pre-test
  • 21. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Selfish Data Generation SUT Execution 1 Execution 2 Execution 3 Data Source Generate Data Generate Data Generate Data
  • 22. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Selfish Data Generation Pros: Unique data per test Does not block shared environments No downtime No stale data Tests can run anywhere Tests become repeatable Cons: Unchecked growth of data source Requires understanding of data model Tests need to know about data
  • 23. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Data Generation & Batch Cleanup Creation - Data generated for each test Cleanup - Data cleaned up after test run Clean up may happen in data source or via SUT
  • 24. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Data Generation & Batch Cleanup SUT Execution 1 Execution 2 Execution 3 Data Source Generate Data Generate Data Generate Data Batch Clean up
  • 25. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Data Generation & Batch Cleanup Pros: Unique data per test Does not block shared environments Minimal downtime No stale data Growth of data source kept in check Tests run anywhere Tests are repeatable Cons: Requires deep understanding of data model Must know what to clean Significant scaffolding must be created
  • 26. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Data Generation & Immediate Cleanup Creation - tests generate their own data Clean up - for each test case immediately after execution Uses a TearDown method supplied by the framework
  • 27. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Data Generation & Immediate Cleanup SUT Execution 1 Execution 2 Execution 3 Data Source Generate Data Generate Data Generate Data Clean up Clean up Clean up
  • 28. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Data Generation & Immediate Cleanup Pros: Tests are repeatable Unique data per test Does not block shared environments Minimal downtime No stale data Growth of data source kept in check No data left over from other tests Tests run anywhere Cons: Requires deep understanding of data model Must know what to clean Significant scaffolding must be created
  • 29. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Creational Strategies Elementary Refreshed Data Source Data Generation Shared Environment Low Downtime Repeatable Tests Data Variance Minimal Data Growth Significant Technical Skills
  • 30. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Cleanup Strategies Elementary (none) Refresh Data Source Batch Immediate (Signed, Marked or Persisted) Shared Environment Low Downtime Repeatable Tests Strong Technical Skills
  • 31. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved How do we know what data to clean up?
  • 32. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Signed Data Record Name: “test_21323” Field Name: “Record Name” Format: “test_<random5digs>” Persist in: – a data source – code
  • 33. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Marked Data An “isTestData” field or Data that is otherwise known to be test data because of its format or type, for example: – A “test user” created it – Linked to known test denotation
  • 34. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Internally Persisted Data Keep a list in memory: – userIds: • 12312 • 4322 • 23423 – emailIds: • 12312 • 423423 • 234
  • 35. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Externally Persisted Data Keep a record in a data source: – userIds: • 12312 • 4322 • 23423 – emailIds: • 12312 • 423423 • 234
  • 36. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved In Review Defined Terms Identified Constraints Walked Through Examples
  • 37. www.beaufortfairmont.com 984.244.2313© 2016 Beaufort Fairmont, LLC All rights reserved Thank you! PAUL MERRILL @dpaulmerrill