preventing data errors with continuous testing
play

Preventing Data Errors with Continuous Testing Kvan Mulu - PowerPoint PPT Presentation

Preventing Data Errors with Continuous Testing Kvan Mulu Yuriy Brun Alexandra Meliou University of Washington University


  1. Preventing Data Errors with Continuous Testing Kıvanç ¡Muşlu ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Yuriy ¡Brun ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Alexandra ¡Meliou ¡ ¡ University of Washington University of Massachusetts

  2. Data ¡discrepancies ¡ 6:15 ¡PM ¡ 6:22 ¡PM ¡ 6:15 ¡PM ¡ 9:54 ¡PM ¡ 9:40 ¡PM ¡ 8:33 ¡PM ¡ slide ¡credit: ¡Luna ¡Dong ¡and ¡Divesh ¡Srivastava ¡

  3. “Pray, ¡Mr. ¡Babbage, ¡if ¡you ¡ put ¡into ¡the ¡machine ¡ wrong ¡figures, ¡will ¡the ¡ right ¡answers ¡come ¡out?” ¡ Charles ¡Babbage, ¡from ¡ Passages ¡from ¡the ¡Life ¡of ¡a ¡Philosopher ¡

  4. Dealing ¡with ¡soUware ¡errors ¡ • program ¡analysis ¡ • language ¡features ¡ • code ¡reviews ¡ • formal ¡verificaVon ¡ … ¡and ¡ tesVng ¡

  5. Key ¡idea: ¡ ¡ TesVng ¡for ¡data-­‑intensive ¡systems ¡ • IdenVfying ¡system ¡failures ¡caused ¡by ¡ ¡ well-­‑formed ¡but ¡incorrect ¡data ¡ • Using ¡applicaVon-­‑specific ¡execuVon ¡informaVon ¡ • IntegraVng ¡into ¡the ¡system ¡usage ¡workflow ¡ Bringing ¡tesVng ¡to ¡the ¡data ¡domain ¡

  6. How ¡is ¡data ¡tesVng ¡different? ¡ System ¡administrators ¡and ¡users ¡ are ¡not ¡soUware ¡engineers ¡ • Data ¡semanVcs ¡ • Test ¡query ¡generaVon ¡ • Timeliness ¡ • Unobtrusive ¡and ¡precise ¡interface ¡

  7. Data ¡semanVcs ¡ • Valid ¡data ¡can ¡span ¡mulVple ¡orders ¡of ¡magnitude ¡ – thwarts ¡staVsVcal ¡outlier ¡detecVon ¡ • SemanVcs ¡of ¡nearly ¡idenVcal ¡data ¡differ ¡vastly: ¡ 617 ¡ 616 ¡ 339 ¡

  8. Test ¡query ¡generaVon ¡ • Administrators ¡and ¡users ¡have ¡not ¡(yet) ¡bought ¡ into ¡tesVng ¡ • Manually ¡wrieen ¡tests ¡will ¡come ¡ – developers ¡can ¡ship ¡these ¡with ¡applicaVon ¡ • But ¡automaVc ¡generaVon ¡is ¡needed ¡now ¡ – mine ¡queries ¡from ¡code ¡ – record ¡historical ¡queries ¡ – adapt ¡related ¡work ¡on ¡database-­‑use ¡test ¡generaVon ¡

  9. Timeliness ¡ • Data ¡tesVng ¡is ¡a ¡runVme ¡acVvity ¡ • Administrators ¡and ¡users ¡don’t ¡troubleshoot ¡ unless ¡something ¡goes ¡wrong ¡ • Learning ¡about ¡an ¡error ¡sooner ¡means ¡error ¡ has ¡less ¡impact ¡

  10. Unobtrusive ¡and ¡precise ¡user ¡interface ¡ • Administrators ¡and ¡users ¡may ¡not ¡understand ¡ test ¡outcomes ¡ • Tests ¡must ¡integrate ¡into ¡workflow ¡ • Results ¡must ¡link ¡to ¡ – acVons ¡that ¡caused ¡failure, ¡or ¡ ¡ – data ¡values ¡relevant ¡to ¡failure ¡

  11. Example ¡scenario: ¡car ¡dealership ¡ • Manager ¡wants ¡to ¡put ¡cars ¡between ¡$10K ¡and ¡$15K ¡ ¡ on ¡a ¡30%-­‑off ¡sale ¡

  12. Car ¡dealership ¡challenges ¡ • Data ¡semanVcs ¡ reducing ¡all ¡prices ¡by ¡30% ¡seems ¡like ¡a ¡valid ¡change ¡ • Test ¡query ¡generaVon ¡ manager ¡doesn’t ¡know ¡about ¡wriVng ¡tests ¡ • Timeliness ¡ manager ¡doesn’t ¡know ¡to ¡run ¡tests ¡ reporVng ¡delay ¡causes ¡financial ¡losses ¡ • Unobtrusive ¡and ¡precise ¡interface ¡ problem ¡cannot ¡be ¡reported ¡as ¡“test ¡failed” ¡

  13. ConVnuous ¡Data ¡TesVng ¡(CDT) ¡ • Data ¡semanVcs ¡and ¡test ¡query ¡generaVon ¡ mines ¡source ¡code ¡for ¡queries ¡ allows ¡manually ¡wrieen ¡and ¡history-­‑mined ¡tests ¡ • Timeliness ¡ run ¡tests ¡conVnuously ¡ opVmizaVons ¡to ¡trigger ¡proper ¡tests ¡at ¡proper ¡Vmes ¡ • Unobtrusive ¡and ¡precise ¡interface ¡ delegates ¡problem ¡to ¡system ¡designer ¡ highlights ¡data ¡involved ¡in ¡tests ¡

  14. Making ¡CDT ¡possible ¡(opVmizaVons) ¡ • NaïveCDT: ¡ ¡run ¡tests ¡conVnuously ¡ • SimpleCDT: ¡ ¡only ¡run ¡tests ¡aUer ¡updates ¡ • SmartCDT: ¡ ¡only ¡relevant ¡tests ¡aUer ¡ ¡relevant ¡changes ¡ • SmartCDT TC : ¡test ¡compression ¡ • SmartCDT IT : ¡incremental ¡test ¡query ¡ ¡execuVon ¡ • SmartCDT TC+IT : ¡all ¡of ¡the ¡above ¡

  15. CDT ¡effecVveness ¡ How ¡effecVve ¡is ¡CDT ¡ ¡ at ¡prevenVng ¡data ¡entry ¡errors? ¡ ¡ Do ¡false ¡posiVves ¡reduce ¡ ¡ CDT’s ¡effecVveness? ¡ ¡ CDT’s ¡and ¡integrity ¡constraints’ ¡effect ¡ ¡ on ¡data ¡entry ¡speed ¡ ¡

  16. Crowd ¡study ¡ 96 ¡disVnct ¡users ¡were ¡asked ¡to ¡copy ¡ ¡ Amazon ¡Mechanical ¡Turk ¡ numeric ¡values ¡into ¡the ¡corresponding ¡cells ¡ Data ¡came ¡from ¡real-­‑world ¡spreadsheets ¡ Group ¡1: ¡control ¡ from ¡data.gov ¡and ¡the ¡EUSES ¡corpus; ¡ ¡ No ¡highlighVng. ¡ ¡Submiqng ¡errors ¡allowed. ¡ tests ¡from ¡formulae ¡in ¡the ¡spreadsheets. ¡ Group ¡2: ¡CDT ¡ Data ¡involved ¡in ¡failing ¡tests ¡highlighted. ¡Submiqng ¡errors ¡OK. ¡ highlighted. ¡ Group ¡3: ¡CDT ¡with ¡false ¡posiVves ¡ Data ¡involved ¡in ¡failing ¡test ¡and ¡40% ¡extra ¡data ¡highlighted. ¡Submiqng ¡errors ¡OK. ¡ highlighted. ¡ Group ¡4: ¡integrity ¡constraints ¡ Data ¡involved ¡in ¡failing ¡integrity ¡constraints ¡highlighted. ¡No ¡submiqng ¡errors. ¡ highlighted. ¡

  17. CDT, ¡even ¡with ¡false ¡posiVves, ¡ successfully ¡prevented ¡data ¡errors ¡ 100 control integrity constraints CDT 80 CDT FP 60 CDT ¡much ¡faster ¡ 40 than ¡integrity ¡ 20 constraints ¡ 0 corrected errors (%) time to correct (sec)

  18. CDT ¡efficiency ¡ CDT’s ¡effect ¡on ¡performance ¡of ¡ performance-­‑intensive ¡applicaVons ¡ NaïveCDT SmartCDT SmartCDT IT SimpleCDT SmartCDT TC SmartCDT TC+IT 18 16 14 Overhead (%) Even ¡with ¡frequent ¡ 12 updates, ¡overhead ¡ 10 is ¡manageable ¡ 8 6 4 2 0 0.1/min 0.2/min 0.33/min 1/min 2/min more ¡frequent ¡updates ¡= ¡more ¡overhead ¡

  19. Related ¡work ¡ • GeneraVng ¡tests ¡for ¡systems ¡that ¡use ¡ databases ¡ Chays, ¡Shahid, ¡and ¡Frankl. ¡Query-­‑based ¡test ¡generaVon ¡ for ¡database ¡applicaVons. ¡DBTest ¡2008. ¡ ¡ Khalek ¡and ¡Khurshid. ¡SystemaVc ¡tesVng ¡of ¡database ¡ engines ¡using ¡a ¡relaVonal ¡constraint ¡solver. ¡ICST ¡2011. ¡ ¡ Li ¡and ¡Csallner. ¡Dynamic ¡symbolic ¡database ¡applicaVon ¡ tesVng. ¡DBTest ¡2010. ¡ ¡ Pan, ¡Wu, ¡and ¡Xie. ¡Database ¡state ¡generaVon ¡via ¡dynamic ¡ symbolic ¡execuVon ¡for ¡coverage ¡criteria. ¡DBTest ¡2011. ¡ ¡ Pan, ¡Wu, ¡and ¡Xie. ¡GeneraVng ¡program ¡inputs ¡for ¡database ¡ applicaVon ¡tesVng. ¡ASE ¡2011. ¡

  20. Related ¡work ¡ • GeneraVng ¡tests ¡for ¡systems ¡that ¡use ¡ databases ¡ • ConVnuous ¡tesVng ¡ Saff ¡and ¡Ernst. ¡Reducing ¡wasted ¡development ¡Vme ¡via ¡ conVnuous ¡tesVng. ¡ISSRE ¡2003. ¡ ¡ Saff ¡and ¡Ernst. ¡An ¡experimental ¡evaluaVon ¡of ¡conVnuous ¡ tesVng ¡during ¡development. ¡ISSTA ¡2004. ¡

  21. Related ¡work ¡ • GeneraVng ¡tests ¡for ¡systems ¡that ¡use ¡ databases ¡ • ConVnuous ¡tesVng ¡ • Effects ¡of ¡conVnuous ¡feedback ¡ Katzan ¡Jr. ¡Batch, ¡conversaVonal, ¡and ¡incremental ¡ compilers. ¡The ¡American ¡FederaVon ¡of ¡InformaVon ¡ Processing ¡SocieVes ¡1969. ¡ ¡ Muslu, ¡Brun, ¡Holmes, ¡Ernst, ¡and ¡Notkin. ¡SpeculaVve ¡ analysis ¡of ¡integrated ¡development ¡environment ¡ recommendaVons. ¡OOPSLA ¡2012. ¡ ¡ Boekhoudt. ¡The ¡big ¡bang ¡theory ¡of ¡IDEs. ¡Queue ¡2003. ¡

  22. Related ¡work ¡ • GeneraVng ¡tests ¡for ¡systems ¡that ¡use ¡ databases ¡ • ConVnuous ¡tesVng ¡ • Effects ¡of ¡conVnuous ¡feedback ¡ • Errors ¡in ¡spreadsheets ¡ Badame ¡and ¡Dig. ¡Refactoring ¡meets ¡spreadsheet ¡formulas. ¡ ICSM ¡2012. ¡ ¡ Barowy, ¡Gochev, ¡and ¡Berger. ¡CheckCell: ¡Data ¡debugging ¡ for ¡spreadsheets. ¡OOPSLA ¡2014. ¡ ¡ Hermans ¡and ¡Dig. ¡BumbleBee: ¡A ¡refactoring ¡environment ¡ for ¡spreadsheet ¡formulas. ¡FSE ¡Tool ¡Demo ¡2014. ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend