title: java.lang.Exception: No runnable methods (Junit)
body: <p>I am using Junit 4.11 and intellij. I have two test classes that I want to run them through suite, however I get the <code>no runnable methods</code> exception.</p>
  
  <p>Here are the test classes:</p>
  
  <pre><code>public class TrackingServiceTest {
  
      private TrackingService service;
  
      @Before
      public void setUp(){
          service = new TrackingService();
      }
  
      @Test
      public void NewTrackingServiceTotalIsZero() {
          assertEquals("tracking service total was not zero", 0, service.getTotal());
      }
  
      @Test
      public void WhenAddingProteinTotalIncreasesByThatAmount(){
          service.addProtein(10);
          assertEquals("protein amount was not correct", 10, service.getTotal());
      }
  
      @Test
      public void WhenRemovingProteinTotalRemainsZero(){
          service.removeProtein(5);
          assertEquals("Total suppose to be zero after removing protein",0, service.getTotal());
      }
      @Test (expected = InvalidGoalException.class)
      public void WhenGoalIsSetToLessThanZeroExceptionIsThrown() throws InvalidGoalException {
          service.setGoal(-5);
      }
  
      @Test (timeout = 100)
      @Ignore
      public void BadTest(){
          for(int i=0; i&lt;100000000; i++)
              service.addProtein(i);
      }
  }
  </code></pre>
  
  <p>And here is another sample test class just to check suite:</p>
  
  <pre><code>public class HelloJUnitTest {
  
      private TrackingService service;
  
      @Before
      public void setUp(){
          service = new TrackingService();
      }
  
      @Test
      public void NewTrackingServiceTotalIsZero() {
          assertEquals("tracking service total was not zero", 0, service.getTotal());
      }
  }
  </code></pre>
  
  <p>And this is my suite class: </p>
  
  <pre><code>@RunWith(Suite.class)
  @Suite.SuiteClasses(value = {
          TrackingService.class,
          HelloJUnitTest.class
  })
  public class ProteinTrackerSuite {
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/iyfuf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iyfuf.png" alt="enter image description here"></a></p>