Home » Java » Enterprise Java » Efficient enterprise testing — conclusion (6/6)

About Sebastian Daschner

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.

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.

Conclusion

  • 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.

(0 rating, 0 votes)
You need to be a registered member to rate this.
1 Comment Views Tweet it!
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Prayag Verma Recent comment authors

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

  Subscribe  
newest oldest most voted
Notify of
Prayag Verma
Guest

Enjoyed Reading “Efficient enterprise testing”, it was informatic