Vague Header Setup

A vague header setup smell occurs when fields are initialized in the header of a class, but not in implicit setup. It is a smell as the behavior of the code is not explicitly defined, and depends on the field modifier (static or member), as well as on the implementation of the test framework. Further, field declarations are not restricted to the header of a class, but can occur anywhere within the class. Vague header setups hamper code comprehension and maintainability.

Reference

M. Greiler, A. van Deursen, M.-A. D. Storey, “Automated Detection of Test Fixture Strategies and Smells”. ICST 2013, pp. 322–331.


Test Smells

Home

All rights reserved (c) Tushar Sharma 2017-23.