title: How do I run JUnit from NetBeans?
body: <p>I've been trying to understand how to start writing and running JUnit tests.</p>
  
  <p>When I'm reading this article:</p>
  
  <p><a href="http://junit.sourceforge.net/doc/testinfected/testing.htm" rel="noreferrer">http://junit.sourceforge.net/doc/testinfected/testing.htm</a></p>
  
  <p>I get the the middle of the page and they write, "JUnit comes with a graphical interface to run tests. Type the name of your test class in the field at the top of the window. Press the Run button."</p>
  
  <p>I don't know how to launch this program.  I don't even know which package it is in, or how you run a library class from an IDE.  </p>
  
  <p>Being stuck, I tried this NetBeans tutorial:  </p>
  
  <p><a href="http://www.netbeans.org/kb/docs/java/junit-intro.html" rel="noreferrer">http://www.netbeans.org/kb/docs/java/junit-intro.html</a></p>
  
  <p>It seemed to be going OK, but then I noticed that the menu options for this tutorial for testing a Java Class Library are different from those for a regular Java application, or for a Java Web App.  So the instructions in this tutorial don't apply generally.</p>
  
  <p>I'm using NetBeans 6.7, and I've imported JUnit 4.5 into the libraries folder.  What would be the normal way to run JUnit, after having written the tests?</p>
  
  <p>The JUnit FAQ describes the process from the Console, and I'm willing to do that if that is what is typical, but given all that I can do inside netbeans, it seems hard to believe that there isn't an easier way.</p>
  
  <p>Thanks much.</p>
  
  <p><strong>EDIT:</strong>  If I right-click on the project and select "Test" the output is:</p>
  
  <pre><code>init:
  deps-jar:
  compile:
  compile-test:
  test-report:
  test:
  BUILD SUCCESSFUL (total time: 0 seconds)
  </code></pre>
  
  <p>This doesn't strike me as the desired output of a test, especially since this doesn't change whether the test condition is true or not.</p>
  
  <p>Any ideas?</p>