title: How to make a bat file and test with it a JUnit4 Test Suite without Eclipse but with Command Line?
body: <p>I finished my two projects, one is a real one, and the other simulates a server that just generates some data, and now i made a junit test suite to test it both and all works.</p>
  
  <p>Now is the time to send the real project together with the tests to a friend that made the real server project, that generates real data.</p>
  
  <p>So I need now to prepare the tests somehow so he can just run them on Command Line, but I have no idea how to do that.</p>
  
  <p>I searched a little on the net, and there was no way to run a test suite from the command line...and I hope you can help me.</p>
  
  <p>Here is what I have in the test project:</p>
  
  <p><a href="https://i.stack.imgur.com/e7Rkh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e7Rkh.png" alt="tests for the real project"></a></p>
  
  <p>The class AllTests is a test suite, from witch I can run all the tests listed in it:</p>
  
  <pre><code>package test.dss;
  
  import org.junit.runner.RunWith;
  import org.junit.runners.Suite;
  import org.junit.runners.Suite.SuiteClasses;
  
  @RunWith(Suite.class)
  @SuiteClasses({
      TestAddAndDeleteScript.class,
      TestEnumerateScripts.class,
      TestEnumerateTemplates.class,
      TestExecute.class,
      TestGetAllImportsList.class,
      TestGetBindings.class, 
      TestGetSource.class,    
      TestGetTemplate.class,
      TestLogin.class, 
      TestLogout.class, 
      TestOpenAndCloseFile.class,
      TestReloadLastLog.class,
      TestSetDates.class, 
      TestSetPatientList.class,
      TestStartStopTimer.class, 
      TestUpdateBindingParameters.class,
      TestUpdateScript.class,
      TestUpdateSharedUserList.class,
      TestUpdateTextArea.class
  })
  public class AllTests {
  
  }
  </code></pre>
  
  <p>Then there are the tests that are for the other project:</p>
  
  <p><a href="https://i.stack.imgur.com/cY9eP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cY9eP.png" alt="The tests for the other project"></a></p>
  
  <p>With a similar code in the AllTests class:</p>
  
  <pre><code>package test.mw;
  
  import org.junit.runner.RunWith;
  import org.junit.runners.Suite;
  import org.junit.runners.Suite.SuiteClasses;
  
  @RunWith(Suite.class)
  @SuiteClasses({
      TestEnumerateParams.class,  
      TestEnumeratePatients.class, // za properties, pogledati red 55
      TestEnumerateScripts.class,
      TestGetAll.class,
      TestGetResults.class,
      TestLogin.class,
      TestLogout.class,
      TestRaiseAlarm.class,
      TestRegisterUnregisterScript.class,
      TestSaveResult.class
  })
  public class AllTests {
  
  }
  </code></pre>
  
  <p>Now, I removed the tests from the workspace, and placed it on the desktop and have to figure out how to test it in command line, while my two projects run in elipse on localhost.</p>
  
  <p>On top, I wanna create a BAT file witch my friend can just run (from the command line) and test his part (the mw part).</p>
  
  <p>Yeah, I forgot to mention, all the jars I need to run the tests are in the JRE System Library, JUnit 4 and referenced Libraries that are from the lib folder.</p>
  
  <p>So, I created a CMD Tests folder on the desktop, and copied all the files from the tests, and it looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/2aivk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2aivk.png" alt="test folder on dekstop"></a></p>
  
  <p>So here are the two parts of my question:
    a) How to test them all at once with the two test suites?
    a.b) If there is no way, how to test each class individually?
    b) How to make a bat file to run it all at once?</p>
  
  <p>Please help. </p>