liveBook · Manning

Embedded test

As explained in Test Driven: Practical TDD and Acceptance TDD for Java Developers

A test that is placed and executed within the application process rather than solely from an external test process.

An embedded test runs inside the application process. For a GUI application, this can avoid splitting test work between an external test process and application hooks that provide remote access to widgets and internal state. section 11.3.4

There are two ways to bring the code together: embed tests in the application, or let tests launch the application. The second approach may fit automated builds more easily because testing frameworks and development tools already run tests. Starting the application first requires a way to initiate tests and collect their results. section 11.3.4

Figure 11.9. Tests are embedded into the application through a plug-in mechanism.

A plug-in mechanism can place tests inside the application. section 11.3.4

How Test Driven: Practical TDD and Acceptance TDD for Java Developers covers it

How deep it goes
Contrasts two ways to combine tests and application code, including automation trade-offs, without detailing plug-in implementation.
Examples
Illustrates tests embedded through a plug-in and an application started from tests.
What you can do after
Evaluate the trade-offs between embedding tests in an application and launching the application from tests.
How it connects
Connects acceptance testing with black-box testing, white-box testing, and automated builds.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Test Driven: Practical TDD and Acceptance TDD for Java Developers. The section links point to the parts of the book it draws on.