Have you seen my article on using Spring for managing test environments in automated tests?

Read all about how to configure your test environment specific data in property files with Spring, to help run your automated TestNG and JUnit tests on any test environment you need: https://blog.testproject.io/2021/02/09/using-spring-to-switch-environments-in-automated-tests/. Enjoy.

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: #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

Quick Tip: Running automated tests in parallel

The What I have a bunch of tests that i would like to run faster, by making them execute in parallel. In my tests: I am not using a DataProvider and only want to make the same test run several times. I am using a DataProvider and want my test to run with the provided… Read More

TestNG custom listeners: ITestListener

When running TestNG tests, one could want to perform some common actions – after each test has finished successfully, after each failed test, after each skipped test, or after all the tests have finished running, no matter their result. To apply such a common behavior to a group of tests, a custom listener can be… Read More

TestNG annotations

Tests written with the TestNG framework need to be annotated properly in order to be recognized as tests. A Java class will contain methods, that will either be the actual tests, or methods that perform some actions needed within a test. A class or a method that represent a test, will be annotated with the… Read More