Enterprise Java

Efficient enterprise testing — conclusion (6/6)

This last part of the series will cover additional end-to-end tests, testing in production, and a conclusion of the parts.

Further end-to-end tests & testing in production

Besides system tests that only verify a single application-under-test and mock external concerns, our pipeline must also include full end-to-end test that verify the system as a whole. The good news is that if we’re crafting our tests in a maintainable way, with reusable components, we can recycle the test scenarios to be fired against other test or staging environments.

It depends on the nature of the business logic, to which regard that is feasible, if for example the system then actually orders a coffee or performs a financial transaction. In these cases it might be possible to add additional business steps, for example add an immediate “undo” transactions or something similar.

As an outlook, this touches the topic of testing in production, verifying the same logical paths that the users also go through and making sure that the tests have no negative impact in the business process, such as ordering actual coffee. Testing in production is, after all the efforts on a test scope, the ultimate verification, whether our system works as expected. Defining our test scenarios in a reasonable way, being driven by the actual business use cases with test code quality in mind, make this endeavor easier to pursue.


  • Favor simple test technology with well-crafted test code
  • Limit the use of test cases that require additional test runners (e.g. Spring Tests, Arquillian, CDI-Unit)
  • Separate test life cycles from test environment life cycles
  • For microservice architectures, favor system over code-level tests
  • Define local development workflows that can run system tests immediately, against already running environments
  • In both system and code-level test scenarios, craft reusable components which separate multiple concerns
  • Use delegation and abstraction layers to separate concerns
  • Test code quality is more important than the choice of technology
  • Be aware of the trade-offs of the different test scopes to craft a balanced, effective test suite

Further resources

All parts of this article series

Published on Java Code Geeks with permission by Sebastian Daschner, partner at our JCG program. See the original article here: Efficient enterprise testing — conclusion (6/6)

Opinions expressed by Java Code Geeks contributors are their own.

Sebastian Daschner

Sebastian Daschner is a self-employed Java consultant and trainer. He is the author of the book 'Architecting Modern Java EE Applications'. Sebastian is a Java Champion, Oracle Developer Champion and JavaOne Rockstar.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
Prayag Verma
4 years ago

Enjoyed Reading “Efficient enterprise testing”, it was informatic

Back to top button