'How to stop all subsequent test executions when @beforeClass has an exception in TestNG Eclipse

When using TestNG in Eclipse, how do I stop my tests with the @Test annotation from executing if there is an exception in my @beforeClass method?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source