arXiv:2609.11824cs.SESep 2026

Manuscript Offprint

arXiv:2609.11824

An analysis of the relationship of input metrics

Addison Crump

Addison Crump

CISPA Helmholtz Center for Information Security

Saarbrücken, Germany

0009-0003-3271-3558

Abstract—Input metrics evaluate the progress of testing in terms of features of inputs present in a test suite. Previous works, as early as the 1950s, established a number of such metrics, but few endeavored to compare them. This paper does so by utilizing existing methods proposed for other metric classes in partition testing literature. After defining and reviewing common input metrics, we begin with a short case study revealing that typical empirical comparison strategies are fundamentally insufficient for comparing metrics. Then, we demonstrate how one rigorously improves a standard metric by defining and implementing k-alt-path, a new metric which reduces redundancy while improving sensitivity over k-path. Each of the other common input metrics are then systematically compared before discussing the implications of our findings. With these contributions, we bring forward partition testing analysis methods that justify and form a strategy for future research in refining input metrics.

I. INTRODUCTION

When we quantify the thoroughness of testing, we most often use definitions of input space subdivision formalized by partition testing. The most common form of subdivision familiar to software testing practitioners is likely code line coverage: which lines of code have been covered during the execution of a particular input or set of inputs. Where code coverage divides the input space based on program features, input metrics divide based on input features. Such features can only be measured when input features are quantifiable, and these generally form along three categories: lexical, by inspecting the sequences of tokens in the input; syntactic, by observing structure of the input; and semantic, by considering the meaning of the input.

Lexical measures of input coverage were introduced earliest, measuring observed sequences of tokens present in tested inputs. This is potentially most famously demonstrated by Shannon [1] for measuring the lexical redundancy of the English language using n-grams, observations of token sequences of length n. Using the measured n-gram distributions for both letters and words, Shannon demonstrates that one can reconstruct approximations of the English language by sampling over probable sequences of characters or words.

A few years later, Chomsky [2] publishes his abstractions for languages. These allow one to define structural rules for languages, encoding syntax rather than raw token sequences to capture the higher-level relationships between words. These grammars eventually become standard for structuring computer-readable languages due to their alignment with the grammars of human languages [3] and their efficient parseability. With such parsers becoming more prevalent, people naturally sought to test them. The same structures for parsing enabled tools for generation and corresponding metrics for computing test suite completeness. Purdom [4] first defines a generation strategy to exercise grammars by producing sentences (i.e., inputs satisfying the grammar) that exercise every production rule of the grammar, implicitly defining rule coverage. Later authors explore input generation by randomly exploring grammars [5]. Eventually, Lämmel [6] defines coverage metrics that introduce context sensitivity and define mechanisms for producing sentences that exercise each manifestation of a production rule. The current standard for syntactic coverage measurement, k-path, is a conceptual extension of Lämmel's work to extend this sensitivity to arbitrary depths [7] and corresponding generators which optimize for that metric.

Generators for semantically valid inputs are also becoming more prevalent. The rapid improvement of LLMs has spurred significant interest into LLM-based test generation, including the generation of test data and inputs [8]. Other works detail specialized generators for specific languages and targets, most often so for source code generation in compiler and interpreter testing [9, 10]. More recently, language-based testing tools attempt to produce semantically valid inputs for arbitrary input languages by performing constraint solving in the process of input production [11, 12]. While input metrics and generation have historically been inextricably linked, coverage metrics for semantic qualities of languages are typically target-specific, and few have attempted to define such metrics [13]. Instead, these works tend to rely instead on syntactic metrics for input diversity and test suite completeness measurement.

The impetus for this work was a pair of questions: are the syntactic metrics used by modern input generators optimal, and are they sufficient? We discovered that these two questions were superseded by one: how does one even compare input metrics? This paper answers this question with three theoretical contributions:

• A brief repudiation of previous comparison strategies between metrics,

• Extension of existing metric comparison strategies from partition testing literature to input metrics, and

• Analysis of how different classes of input metrics align.

Along the way, we optimize the standard k-path metric significantly with a new metric, k-alt-path, and systematize the relationship between existing input metrics.

References (35)