Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliasnogueira/a51908570f2e04104d0b1ec85facd411 to your computer and use it in GitHub Desktop.
Save eliasnogueira/a51908570f2e04104d0b1ec85facd411 to your computer and use it in GitHub Desktop.
5 Tools Java Developers can use to deliver High-Quality software

Title

5 Tools Java Developers can use to deliver High-Quality software

Description

Do you find it difficult to choose the right library to decrease the time you spend fixing bugs in your code? This talk will help you to not waste time presenting 5 tools to add additional test coverage at different levels of your application, each with a specific tip about the tool and its implementation via code. Now the levels of unit testing, integration, API and Web can be easily tested with these 5 tools.

This presentation will give you a full overview of the SLDC using all the necessary tools to deliver a free-bug software.

Elevator Pitch

Choosing tools and/or libraries to increase test coverage and deliver reliable software is difficult because there are already several libraries with the same purpose, but with different ways of use. Only 5 tools can help any Java developer to deliver error-free software.

Tools

I will start explaining each tool with a theoretical concept of why the tool is important in that context, followed by a live coding showing a code tip. At the end of the explanation, I will give one last tip, which is the creation of an e2e pipeline that will run tests at all the application levels, thus bringing more reliability in delivery. I will show the following 5 tools and the best applicable code tip:

JUnit 5

I will explain why unit testing tools are important and that they can be the basis for test creation in other tools. The implementation tip (code) will be an example of how to use Method Source and how it helps us in situations where we have the data-driven test.

Mockito

I will explain the importance of creating mocks for the unit test level and why it is important to know the differences behind the Test Double. The implementation tip (code) will be an example of how to use Argument Captor to check argument values.

Wiremock

I will explain that it is also important to create more robust mocks for external dependencies, where several people on the team can benefit from the same mock source by applying the Service Virtualization strategy. The implementation tip (code) will be an example of how to create a virtualization service, without code, through JSON files for the request and response that will always be available through a Docker image.

RestAssured

I will explain that creating robust API tests is a key point for delivering quality services and that this can be easily achieved using RestAssured. The implementation tip (code) will be an example of how to reuse specifications through the Specification re-use to avoid code duplication.

Selenium WebDriver

I will explain that testing the UI layer is still important and relevant, but avoiding one of the big anti-patterns that are the Ice Cream Cone. I will also explain the importance of using explicit waits to make testing less flaky. The implementation tip (code) will be to implement an automatic strategy of explicit waiting using Page Objects + Page Factory + AjaxElementLocatorFactory.

Bonus

I will explain the importance of creating an e2e pipeline using the tools presented and an example of a Jenkins pipeline, but that the same approach can be applied to any CI/CD tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment