Systematic Generation of Conformance Tests for JavaScript

08/16/2021
by   Blake Loring, et al.
0

JavaScript implementations are tested for conformance to the ECMAScript standard using a large hand-written test suite. Not only in this a tedious approach, it also relies solely on the natural language specification for differentiating behaviors, while hidden implementation details can also affect behavior and introduce divergences. We propose to generate conformance tests through dynamic symbolic execution of polyfills, drop-in replacements for newer JavaScript language features that are not yet widely supported. We then run these generated tests against multiple implementations of JavaScript, using a majority vote to identify the correct behavior. To facilitate test generation for polyfill code, we introduce a model for structured symbolic inputs that is suited to the dynamic nature of JavaScript. In our evaluation, we found 17 divergences in the widely used core-js polyfill and were able to increase branch coverage in interpreter code by up to 15 typically written even before standardization, our approach will allow to maintain and extend standardization test suites with reduced effort.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/15/2023

Automated Test Case Generation Using Code Models and Domain Adaptation

State-of-the-art automated test generation techniques, such as search-ba...
research
05/14/2021

Automatically Assessing and Extending Code Coverage for NPM Packages

Typical Node.js applications extensively rely on packages hosted in the ...
research
11/28/2022

P4Testgen: An Extensible Test Oracle For P4

We present P4Testgen, a test oracle for the P4_16 language. P4Testgen su...
research
08/02/2023

Manual Tests Do Smell! Cataloging and Identifying Natural Language Test Smells

Background: Test smells indicate potential problems in the design and im...
research
04/03/2021

Input Validation with Symbolic Execution

Symbolic execution has always been plagued by the inability to handle pr...
research
01/03/2020

Verifying Cryptographic Security Implementations in C Using Automated Model Extraction

This thesis presents an automated method for verifying security properti...
research
12/20/2022

Execution-Based Evaluation for Open-Domain Code Generation

To extend the scope of coding queries to more realistic settings, we pro...

Please sign up or login with your details

Forgot password? Click here to reset