Abstract :
[en] Many di fferent techniques and tools for automated unit test
generation target the Java programming languages due to its popular-
ity. However, a lot of Java's popularity is due to its usage to develop
enterprise applications with frameworks such as Java Enterprise Edition
(JEE) or Spring. These frameworks pose challenges to the automatic gen-
eration of JUnit tests. In particular, code units (\beans") are handled by
external web containers (e.g., WildFly and GlassFish). Without consid-
ering how web containers initialize these beans, automatically generated
unit tests would not represent valid scenarios and would be of little use.
For example, common issues of bean initialization are dependency in-
jection, database connection, and JNDI bean lookup. In this paper, we
extend the EvoSuite search-based JUnit test generation tool to provide
initial support for JEE applications. Experiments on 247 classes (the
JBoss EAP tutorial examples) reveal an increase in code coverage, and
demonstrate that our techniques prevent the generation of useless tests
(e.g., tests where dependencies are not injected).
Scopus citations®
without self-citations
7