search based testing of relational schema integrity
play

Search-Based Testing of Relational Schema Integrity Constraints - PowerPoint PPT Presentation

Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems Gregory M. Kapfhammer 1 & Phil McMinn 2 & Chris J. Wright 2 1 Allegheny College, USA 2 University of Sheffield, UK Sixth IEEE


  1. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema INSERT ✗ Relational Database Management System Schema Schema State E-commerce The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  2. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema INSERT ✗ Relational Database Management System Schema Schema State State E-commerce The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  3. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema Relational Database Management System Schema State E-commerce The Relational Schema is Not Working Correctly The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  4. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema ✓ INSERT ✗ Relational Database Management System Schema State E-commerce The Relational Schema is Not Working Correctly The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  5. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema ✓ INSERT ✗ Relational Database Management System Schema Schema State E-commerce The Relational Schema is Not Working Correctly The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  6. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema ✓ INSERT ✗ Relational Database Management System Schema Schema State State E-commerce The Relational Schema is Not Working Correctly The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  7. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema ✗ INSERT ✓ Relational Database Management System Schema State E-commerce The Relational Schema is Not Working Correctly The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  8. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema ✗ INSERT ✓ Relational Database Management System Schema Schema State E-commerce The Relational Schema is Not Working Correctly The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  9. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema ✗ INSERT ✓ Relational Database Management System Schema Schema State State E-commerce The Relational Schema is Not Working Correctly The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  10. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema SELECT ✓ Relational Database Management System Schema Schema State State E-commerce The Relational Schema is Not Working Correctly The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  11. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema SELECT ✓ SELECT ✓ Relational Database Management System RESULT ✗ Schema Schema State State E-commerce The Relational Schema is Not Working Correctly The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  12. Introduction Testing Technique Empirical Study Conclusion Challenges Relational Database Schema Not working correctly! SELECT ✓ SELECT ✓ Relational Database Management System RESULT ✗ Schema Schema State State E-commerce The Relational Schema is Not Working Correctly The Relational Schema is Working Correctly Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  13. Introduction Testing Technique Empirical Study Conclusion Challenges Need for Relational Schema Testing The Data Warehouse Institute reports that North American organizations experience a $611 billion annual loss due to poor data quality Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  14. Introduction Testing Technique Empirical Study Conclusion Challenges Need for Relational Schema Testing The Data Warehouse Institute reports that North American organizations experience a $611 billion annual loss due to poor data quality Scott W. Ambler argues that the “virtual absence” of database testing — the validation of the contents, schema, and functionality of the database — is the primary cause of this loss Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  15. Introduction Testing Technique Empirical Study Conclusion Challenges Need for Relational Schema Testing The Data Warehouse Institute reports that North American organizations experience a $611 billion annual loss due to poor data quality Scott W. Ambler argues that the “virtual absence” of database testing — the validation of the contents, schema, and functionality of the database — is the primary cause of this loss This paper presents SchemaAnalyst , a search-based system for testing the complex integrity constraints in relational schemas Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  16. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  17. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); The highlighted integrity constraints determine what data is valid Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  18. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); The highlighted integrity constraints determine what data is valid Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  19. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); The highlighted integrity constraints determine what data is valid Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  20. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); The highlighted integrity constraints determine what data is valid Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  21. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE FlightAvailable ( FLIGHT ID CHAR(6) NOT NULL, SEGMENT NUMBER INT NOT NULL, FLIGHT DATE DATE NOT NULL, ECONOMY SEATS TAKEN INT, BUSINESS SEATS TAKEN INT, FIRSTCLASS SEATS TAKEN INT, PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER), FOREIGN KEY(FLIGHT ID, SEGMENT NUMBER) REFERENCES Flights(FLIGHT ID, SEGMENT NUMBER) ); The highlighted integrity constraints determine what data is valid Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  22. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE FlightAvailable ( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , FLIGHT DATE DATE NOT NULL , ECONOMY SEATS TAKEN INT, BUSINESS SEATS TAKEN INT, FIRSTCLASS SEATS TAKEN INT, PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER), FOREIGN KEY(FLIGHT ID, SEGMENT NUMBER) REFERENCES Flights(FLIGHT ID, SEGMENT NUMBER) ); The highlighted integrity constraints determine what data is valid Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  23. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE FlightAvailable ( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , FLIGHT DATE DATE NOT NULL , ECONOMY SEATS TAKEN INT, BUSINESS SEATS TAKEN INT, FIRSTCLASS SEATS TAKEN INT, PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , FOREIGN KEY(FLIGHT ID, SEGMENT NUMBER) REFERENCES Flights(FLIGHT ID, SEGMENT NUMBER) ); The highlighted integrity constraints determine what data is valid Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  24. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE FlightAvailable ( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , FLIGHT DATE DATE NOT NULL , ECONOMY SEATS TAKEN INT, BUSINESS SEATS TAKEN INT, FIRSTCLASS SEATS TAKEN INT, PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , FOREIGN KEY(FLIGHT ID, SEGMENT NUMBER) REFERENCES Flights(FLIGHT ID, SEGMENT NUMBER) ); The highlighted integrity constraints determine what data is valid Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  25. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas Defect: The schema does not contain the correct primary key! Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  26. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Defect: The schema does not contain the correct primary key! Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  27. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE FlightAvailable ( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , FLIGHT DATE DATE NOT NULL , ECONOMY SEATS TAKEN INT, BUSINESS SEATS TAKEN INT, FIRSTCLASS SEATS TAKEN INT, PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , FOREIGN KEY(FLIGHT ID, SEGMENT NUMBER) REFERENCES Flights(FLIGHT ID, SEGMENT NUMBER) ); Defect: The schema does not contain the correct primary key! Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  28. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas CREATE TABLE FlightAvailable ( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , FLIGHT DATE DATE NOT NULL , ECONOMY SEATS TAKEN INT, BUSINESS SEATS TAKEN INT, FIRSTCLASS SEATS TAKEN INT, PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , FOREIGN KEY(FLIGHT ID, SEGMENT NUMBER) REFERENCES Flights(FLIGHT ID, SEGMENT NUMBER) ); Question: What kind of INSERT (s) will reveal this defect? Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  29. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas INSERT INTO Flights VALUES(’UA20’, 1, ... ) ✓ Question: What kind of INSERT (s) will reveal this defect? Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  30. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas INSERT INTO Flights VALUES(’UA20’, 1, ... ) ✓ INSERT INTO Flights VALUES(’UA20’, 2, ... ) ✗ Question: What kind of INSERT (s) will reveal this defect? Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  31. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas INSERT INTO Flights VALUES(’UA20’, 1, ... ) ✓ INSERT INTO Flights VALUES(’UA20’, 2, ... ) ✗ Explanation: A flight with two different segments is no longer allowed! Question: What kind of INSERT (s) will reveal this defect? Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  32. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Defects in Relational Schemas SchemaAnalyst automatically generates these INSERT s and this data! INSERT INTO Flights VALUES(’UA20’, 1, ... ) ✓ INSERT INTO Flights VALUES(’UA20’, 2, ... ) ✗ Explanation: A flight with two different segments is no longer allowed! Question: What kind of INSERT (s) will reveal this defect? Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  33. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Search-Based Testing with SchemaAnalyst Test Suite Test Suites Generator Representation Schema Test suites Generator Mutants Mutation and Analysis Scores Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  34. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Search-Based Testing with SchemaAnalyst Test Suite Test Suites Generator Representation Schema Test suites Generator Mutants Mutation and Analysis Scores Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  35. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Search-Based Testing with SchemaAnalyst Test Suite Test Suites Generator Representation Schema Test suites Generator Mutants Mutation and Analysis Scores Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  36. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Search-Based Testing with SchemaAnalyst Test Suite Test Suites Generator Representation Schema Test suites Generator Mutants Mutation and Analysis Scores Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  37. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation Goal of test data generation? Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  38. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation Goal of test data generation? INSERT INTO T 1 VALUES(1, Jan-08-99, ... ) ✓ Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  39. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation Goal of test data generation? INSERT INTO T 1 VALUES(1, Jan-08-99, ... ) ✓ INSERT INTO T 1 VALUES(1, Jan-08-99, ... ) ✗ Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  40. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation Goal of test data generation? INSERT INTO T 1 VALUES(1, Jan-08-99, ... ) ✓ INSERT INTO T 1 VALUES(1, Jan-08-99, ... ) ✗ INSERT INTO T n VALUES(true, ’L-20’, ... ) ✓ INSERT INTO T n VALUES(false, ’L-1’, ... ) ✗ Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  41. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  42. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Stage 1: Generate rows of data to satisfy the integrity constraints Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  43. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Stage 1: Generate rows of data to satisfy the integrity constraints Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  44. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  45. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Stage 2: Generate rows of data to negate a constraint Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  46. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Stage 2: Generate rows of data to negate a constraint Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  47. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); A fitness function computes a numeric value minimized by search Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  48. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Data’s fitness is closer to zero when nearer to a primary key value Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  49. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Types, primary and foreign keys, UNIQUE , NOT NULL , and CHECK Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  50. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Goals and Stages of Test Data Generation CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); See the paper for more details about the computation of fitness Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  51. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V i Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  52. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  53. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  54. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use the defaults to form the initial values of the INSERT variables Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  55. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use exploratory moves to determine the correct direction for search Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  56. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use exploratory moves to determine the correct direction for search Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  57. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use exploratory moves to determine the correct direction for search Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  58. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use exploratory moves to determine the correct direction for search Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  59. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use exploratory moves to determine the correct direction for search Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  60. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use exploratory moves to determine the correct direction for search Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  61. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use pattern moves to accelerate the improvements in fitness Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  62. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use pattern moves to accelerate the improvements in fitness Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  63. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use pattern moves to accelerate the improvements in fitness Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  64. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use pattern moves to accelerate the improvements in fitness Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  65. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use pattern moves to accelerate the improvements in fitness Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  66. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use pattern moves to accelerate the improvements in fitness Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  67. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use pattern moves to accelerate the improvements in fitness Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  68. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Use pattern moves to accelerate the improvements in fitness Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  69. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k AVM terminates when the fitness is zero or an exploration cycle fails Use pattern moves to accelerate the improvements in fitness Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  70. Introduction Testing Technique Empirical Study Conclusion Test Data Generation Alternating Variable Method V j V i V k Restart AVM with random column values when an exploration cycle fails AVM terminates when the fitness is zero or an exploration cycle fails Use pattern moves to accelerate the improvements in fitness Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  71. Introduction Testing Technique Empirical Study Conclusion Relational Schema Mutation Mutation Operators for Schemas CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  72. Introduction Testing Technique Empirical Study Conclusion Relational Schema Mutation Mutation Operators for Schemas CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Use mutation analysis to assess the adequacy of INSERT s and values Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  73. Introduction Testing Technique Empirical Study Conclusion Relational Schema Mutation Mutation Operators for Schemas CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Primary Keys : Remove, replace, and add column operators Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

  74. Introduction Testing Technique Empirical Study Conclusion Relational Schema Mutation Mutation Operators for Schemas CREATE TABLE Flights( FLIGHT ID CHAR(6) NOT NULL , SEGMENT NUMBER INT NOT NULL , ORIGINAL AIRPORT CHAR(3), DEPART TIME TIME, DEST AIRPORT CHAR(3), ARRIVE TIME TIME, MEAL CHAR(1), PRIMARY KEY(FLIGHT ID, SEGMENT NUMBER) , CHECK(MEAL IN (’B’, ’L’, ’D’, ’S’)) ); Primary Keys : Remove, replace, and add column operators Kapfhammer, McMinn, and Wright March 19, 2013 Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

Recommend


More recommend