This post is a list of 100 tips about Java and Testing tools. The tips are composed of the following tools and will be posted in this order:
- JUnit
- Selenium WebDriver
- WireMock
- TestNG
- RestAssured
Every day I will post on my Twitter and LinkedIn account one tip for you.
This page is updated weekly.
# | Tool | Tip |
---|---|---|
1 | JUnit 5 | With JUnit5 you can parameterize your tests using a ValueSource https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests |
2 | Selenium Web | Selenium WebDriver has a Grid-based on Docker images where you can distribute and/or parallelize your web tests https://github.com/SeleniumHQ/docker-selenium |
3 | WireMock | You can run WireMock in different modes: standalone, JUnit 4.x Rule, or through the WireMockServer class http://wiremock.org/docs/getting-started |
4 | TestNG | TestNG has an extensively Command Line Parameters to run your tests https://testng.org/doc/documentation-main.html#running-testng |
5 | RestAssured | With RestAssured you can configure it to return BigDecimal instead of float or double https://github.com/rest-assured/rest-assured/wiki/Usage#returning-floats-and-doubles-as-bigdecimal |
6 | JUnit | You can use Composed Annotation to add more than one action for your tests, like the @Test and a filter using JUnit5 https://junit.org/junit5/docs/current/user-guide/#writing-tests-meta-annotations |
7 | Selenium WebDriver | Selenium WebDriver needs a binary for the browser you will use https://www.selenium.dev/documentation/en/webdriver/driver_requirements |
8 | WireMock | You can easily create a Mock Server with a few lines of code using WireMock http://wiremock.org/docs/java-usage |
9 | TestNG | You can create Test Groups to easily filter your test by any category with TestNG https://testng.org/doc/documentation-main.html#test-groups |
10 | RestAssured | With RestAssured you can choose between #Jackson, #Jackson2, GSON or Johnzon to use the automatic serialization/deserialization https://github.com/rest-assured/rest-assured/wiki/Usage#object-mapping |
11 | JUnit | With JUnit5 you can use @DisplayName to add a custom name during the test execution instead of seeing the test method name. https://junit.org/junit5/docs/current/user-guide/#writing-tests-display-names |
12 | Selenium WebDriver | You can locate one or more elements using different locators in Selenium WebDriver https://www.selenium.dev/documentation/en/getting_started_with_webdriver/locating_elements |
13 | WireMock | With WireMock you can apply different configurations like network and port bindings, HTTP, proxy, file location, gzip, cors, etc… http://wiremock.org/docs/configuration |
14 | TestNG | You can inject data into your tests using the @Parameter annotation in TestNG https://testng.org/doc/documentation-main.html#parameters |
15 | RestAssured | With RestAssured you can validate your JSON Schema. In this link, you can find an example and the additional library to use https://github.com/rest-assured/rest-assured/wiki/Usage#json-schema-validation |
16 | JUnit | With JUnit5 you can use Java 8 lambdas inside the assertions https://junit.org/junit5/docs/current/user-guide/#writing-tests-display-names |
17 | Selenium WebDriver | You can perform actions like click, type, and drag-and-drop in Selenium WebDriver https://www.selenium.dev/documentation/en/getting_started_with_webdriver/performing_actions_on_the_aut |
18 | WireMock | You can run WireMock standalone creating service virtualization for your necessity using the jar file or writing Java code http://wiremock.org/docs/running-standalone |
19 | TestNG | With TestNG, you can add dependency between tests https://testng.org/doc/documentation-main.html#dependent-methods |
20 | RestAssured | With RestAssured you can extract values from the JSON response using the JSON Path https://github.com/rest-assured/rest-assured/wiki/Usage#json-using-jsonpath |
21 | JUnit | You can use Assumptions on #JUnit5 to assume you are in the expected state/place, like on the dev environment https://junit.org/junit5/docs/current/user-guide/#writing-tests-assumptions |
22 | Selenium WebDriver | You can manipulate the browser doing actions like navigation, back, forward, refresh and manage different windows in Selenium WebDriver https://www.selenium.dev/documentation/en/webdriver/browser_manipulation |
23 | WireMock | You can create a Stub using WireMock, adding priority, sending response headers, and specifying the response body to it http://wiremock.org/docs/stubbing |
24 | TestNG | You can create tests dynamically using the @Factory annotation in TestNG https://testng.org/doc/documentation-main.html#factories |
25 | RestAssured | With RestAssured you can extract values from the XML response using the XML Path https://github.com/rest-assured/rest-assured/wiki/Usage#xml-using-xmlpath |
Would like to follow me and see the tips daily? Just click on the social media below.
Would you like to have 5 specific examples?
You can download my eBook 5 Tools Java Developers Can Use To Deliver High-Quality Software.


