TestNG how to skip test when beforetest fails in inheritance
<p>I have a little problem with testNG. Below my example code:</p>

<pre><code>abstract class parent {

 abstract void beforeTest();

 @Test
 void test() {
         // some testing
 }
}

class child extends parent {

 @BeforeTest
 void beforeTest() {
      \\some before things
 }
}
</code></pre>

<p>And the question is how to do this code work properly? So I want to perform beforeTest() method and if it fails the test method shoud skip. How can I achieve this thing?</p>