January 2018
Intermediate to advanced
348 pages
8h 17m
English
This is the simplest form of tests one would write to verify the finer details within the code. The subject of the test is usually a class or a couple of classes that collaborate with each other. The code can be tested without starting up a Java EE container, making it extremely fast to run. The pyramid's layer for unit tests shows that we should invest in building a larger number of unit tests than others, as these are easier to maintain, and it helps with faster feedback. Some popular frameworks for unit testing include JUnit and TestNG.
Since most of the Java EE components such as EJBs are just classes with annotations, it is easy to unit test them without a container. However, doing so does not aid in testing the component ...