From the course: Java Refactoring Best Practices

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Testing your code

Testing your code

- [Instructor] We all know the importance of testing and software development. So let's look at some best practices for writing effective tests in Java. Testing can help to catch bug and prevent regressions. Effective testing helps improve the design and maintainability of the software. Testing is incredibly important. Again, I'd love to dive into detail here, but this video would then be 20 hours or so. Again, there are excellent courses in the LinkedIn library to give you more details. I'll just stick to the high-level best practices for testing on the Java application level. First of all, make sure to write clear and concise tests. Just like the code itself, tests should have a single responsibility, a focus on only one piece of functionality. It is commonly argued that working with TDD, test-driven development, increases the quality of tests. This means that you write the test before you start writing the…

Contents