The Automated Regression Suite. Part 3 of 3. How to run the suite

Once you have a regression suite set up, you will need to run it. When you have a smaller number of tests that need to be run on a specified day, that won’t be a problem, and the tests will successfully finish running within the allocated time period. However, as the suite becomes larger and… Read More

Better Test Code Principles #5: Mind your try/catches

Using try/catches to handle exceptions has become quite fashionable when writing tests with Java. However, this approach is also a frequent source of having false positives while running tests. Many times when writing the tests people forget to consider both sections of this code block: they forget to write the appropriate code in both sections… Read More

Better Test Code Principles: #2 Don’t generate ALL your test data in @BeforeClass

A considerable amount of tests will need some test data to be generated previous to them running. Some people prefer to put all the data creation for all the tests in a class into the @BeforeClass method, some others prefer to keep the prerequisite data creation inside the tests themselves.

SoftAssert – don’t make your test fail on the first assertion failure

When you have more than one assertion in your test, you might want one of two things: Have your tests fail once the first assertion failure is encountered. Have all your assertions run, no matter if they have passed or failed. Of course, after they are run, if there are failures, you want the test… Read More

Import the testing dependencies

The central and most essential part of a Maven project is its’ pom.xml file. Among other information (like the project’s defining artifactID and groupID), it stores the list of dependencies your project has and the plugins the project will use. Dependencies that are declared within the pom.xml file will be downloaded from the Maven repository… Read More