Test-Case Reduction via Test-Case Generation: Insights From the Hypothesis Reducer
Mon 16 Nov 2020 04:00 - 04:20 at SPLASH-I - S-5 Chair(s): Davide Ancona, Jeremy Gibbons
We describe internal test case reduction, the method of test case reduction employed by the widely-used Hypothesis property-based testing tool for Python. The key idea of internal test-case reduction is that instead of applying test-case reduction externally to generated test cases, we apply it internally, to the sequence of random choices made during generation, so that a test case is reduced by continually re-generating smaller and simpler test cases that continue to trigger some property of interest in the system under test (e.g. a failure). This allows for fully generic test-case reduction without any user intervention and without the need to write a specific test case reducer for a particular application domain. It also significantly mitigates the test-case validity problem of test-case reduction by ensuring that any reduced test case is one that could in principle have been generated. We describe the rationale behind this approach, explain how it is implemented in Hypothesis in practice, and present an extensive evaluation comparing its effectiveness to that of several other test case reducers, including C-Reduce, Picire and the TSTL reducer, on applications including Python auto-formatting, C compilers, and the SymPy symbolic math library. Our hope is that these insights into the reduction mechanism employed by Hypothesis will be useful to researchers interested in randomized testing and test case reduction, as the crux of the approach is fully generic and should be applicable to any random generator of test cases.
Sun 15 NovDisplayed time zone: Central Time (US & Canada) change
15:00 - 16:20 | S-5Research Papers at SPLASH-I +12h Chair(s): Davide Ancona DIBRIS, University of Genova, Italy, Eli Tilevich Virginia Tech | ||
15:00 20mTalk | Model-View-Update-Communicate: Session Types meet the Elm Architecture Research Papers Simon Fowler University of Glasgow Link to publication DOI Pre-print Media Attached | ||
15:20 20mTalk | Putting Randomized Compiler Testing into Production Research Papers Link to publication DOI Media Attached | ||
15:40 20mTalk | Owicki-Gries Reasoning for C11 RAR Research Papers Sadegh Dalvandi University of Surrey, Simon Doherty University of Sheffield, Brijesh Dongol University of Surrey, Heike Wehrheim Paderborn University Link to publication DOI Media Attached | ||
16:00 20mTalk | Test-Case Reduction via Test-Case Generation: Insights From the Hypothesis Reducer Research Papers Link to publication DOI Media Attached |
Mon 16 NovDisplayed time zone: Central Time (US & Canada) change
03:00 - 04:20 | S-5Research Papers at SPLASH-I Chair(s): Davide Ancona DIBRIS, University of Genova, Italy, Jeremy Gibbons Department of Computer Science, University of Oxford | ||
03:00 20mTalk | Model-View-Update-Communicate: Session Types meet the Elm Architecture Research Papers Simon Fowler University of Glasgow Link to publication DOI Pre-print Media Attached | ||
03:20 20mTalk | Putting Randomized Compiler Testing into Production Research Papers Link to publication DOI Media Attached | ||
03:40 20mTalk | Owicki-Gries Reasoning for C11 RAR Research Papers Sadegh Dalvandi University of Surrey, Simon Doherty University of Sheffield, Brijesh Dongol University of Surrey, Heike Wehrheim Paderborn University Link to publication DOI Media Attached | ||
04:00 20mTalk | Test-Case Reduction via Test-Case Generation: Insights From the Hypothesis Reducer Research Papers Link to publication DOI Media Attached |