Ignored Test
Definition:
JUnit 4 provides developers with the ability to suppress test methods from running. However, these ignored test methods result in overhead since they add unnecessary overhead with regards to compilation time, and increases code complexity and comprehension.
Code Example:
@Ignore("disabled for now as this test is too flaky")
public void peerPriority() throws Exception {
final List addresses = Lists.newArrayList(
new InetSocketAddress("localhost", 2000),
new InetSocketAddress("localhost", 2001),
new InetSocketAddress("localhost", 2002)
);
peerGroup.addConnectedEventListener(connectedListener);
.....
}
References:
Quality attributes
- Code Example
- Cause and Effect
- Frequency
- Refactoring
A preliminary evaluation on the relationship among architectural and test smells
An Exploratory Study on the Refactoring of Unit Test Files in Android Applications
Automatic Identification of High-Impact Bug Report by Product and Test Code Quality
Handling Test Smells in Python: Results from a Mixed-Method Study
On the Distribution of “Simple Stupid Bugs” in Unit Test Files: An Exploratory Study
On the diffusion of test smells and their relationship with test code quality of Java projects
On the distribution of test smells in open source Android applications: an exploratory study
On the test smells detection: an empirical study on the jnose test accuracy
The secret life of test smells-an empirical study on test smell evolution and maintenance