200 likes | 355 Vues
Cross feature testing in database systems. Sung Hsueh , Arvind Ranasaria Microsoft SQL Server Microsoft Corp. Overview. Well known problem Not well solved Large problem space Open challenge (not fully defined). Definition.
E N D
Cross feature testing in database systems Sung Hsueh, ArvindRanasaria Microsoft SQL Server Microsoft Corp SIGMOD DBTest 2008
Overview • Well known problem • Not well solved • Large problem space • Open challenge (not fully defined) SIGMOD DBTest 2008
Definition • Software testing that focuses on exposing issues which occur only when two or more features are used together SIGMOD DBTest 2008
Challenge • How many combinations need to be tested? • For a database with just 50 features, this yields 1125899906842573 combinations! SIGMOD DBTest 2008
Challenge (cont’d) • Easy to miss combinations • Consider KB# 933265 • Error 1203 on INSERT • Requires: • Table with identity column • INSERT statement • Parallel INSERT statement • Multi-proc machine SIGMOD DBTest 2008
Traditional Strategies/Techniques • Big Bang • Top-Down/Bottom-Up • Pairwise • Code analysis • Related Areas: • Interaction Testing • Combinatorial Testing SIGMOD DBTest 2008
So….why are we here? • So what’s wrong with these strategies? • Well, nothing really • Good at reducing problem space, reducing complexity • BUT • Not cross feature specific • Not database specific SIGMOD DBTest 2008
Cross feature specific • Take into account relationships between features • should define how they are tested • Correlate relationship type with issue type • should define severity and priority SIGMOD DBTest 2008
Database specific • Database is a platform • Defined external API’s • Component layer boundaries • Shared object space SIGMOD DBTest 2008
Interaction Types • Independent • Orthogonal • Non-orthogonal • Exclusive SIGMOD DBTest 2008
Independent • Isolated in code • Isolated in behavior • Does not even use the same objects • Must test assumptions • Example: • Aggregate function and version number SIGMOD DBTest 2008
Orthogonal • Isolated in behavior • Can have code overlap • Can use shared objects • Easy to make the wrong assumptions, must be validated • Example: • NVARCHAR and VARCHAR SIGMOD DBTest 2008
Non-Orthogonal • Identified Behavior Change • Using one feature will affect how another feature works • Example: • Indexing and query optimizing SIGMOD DBTest 2008
Exclusive • Features can not work together at all • Using one feature requires the other feature to be disabled • Must verify that feature is appropriately disabled or blocked from being enabled • Example: • Single user mode and client connections SIGMOD DBTest 2008
Failure Types • Error • Unexpected Behavior • Performance SIGMOD DBTest 2008
Error • Easy to identify: will be an error message, crash, access violation, assertion, etc • May mask other issues (i.e. this is the “obvious” symptom) • Severity based on type of error • High priority as this is highly visible SIGMOD DBTest 2008
Unexpected Behavior • May be harder to diagnose as issue is less obvious • Might be missed if test misses some aspect of validation • Can result in security issues • Severity based on behavior change • Priority based on behavior change SIGMOD DBTest 2008
Performance • Can be related to behavior changes • Should be relatively easy to spot with the right performance metrics • Not necessarily speed (i.e. compression) • Severity can be identified by perf regression • Priority depends on the feature involved SIGMOD DBTest 2008
What Next? • How can we use these interaction categories to come up with new strategies and techniques in test design? • Can we use these failure types to better validated our tests/automate test verification • How can we architect the database to be more agile to cross feature issues? SIGMOD DBTest 2008
Questions? • Contact: • Sung Hsueh: sung.hsueh@microsoft.com • ArvindRanasaria: arvind.ranasaria@microsoft.com SIGMOD DBTest 2008