• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package test.invocationcount;
2 
3 import org.testng.annotations.BeforeClass;
4 import org.testng.annotations.Test;
5 
6 public class FailedInvocationCount {
7   int m_count;
8 
9   @BeforeClass
setUp()10   public void setUp() {
11     m_count = 0;
12   }
13 
14   @Test(invocationCount = 10)
f()15   public void f() {
16     if (m_count++ > 3) {
17       throw new RuntimeException();
18     }
19   }
20 
21 }
22