title: How to run TestNG suite from command line
body: <p>I would like to run <code>TestNG Suite</code> from command line on <code>Linux</code>. I'm using <code>eclipse</code> to run test, but I have problem with command line. I know that I need to have <code>testng.jar</code> and I have it in <code>/home/karcio/dev/testng-6.4.jar</code>, location my suite xml is <code>/home/karcio/git/java-test-automation/Automation/test-output/Default suite/TestSuite.xml</code> . Commands what I tried, </p>
  
  <ol>
  <li>set classpath <code>/home/karcio/dev/testng-6.4.jar</code></li>
  <li>cd /location to my suite xml file: <code>java org.testing.TestNG TestSuite.xml</code></li>
  </ol>
  
  <p>This is error what I see:</p>
  
  <p><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/testing/TestNG
  Caused by: java.lang.ClassNotFoundException: org.testing.TestNG</code></p>
  
  <p>I'm new in those path and classpath, I'm little bit confusing :(</p>
  
  <p>Thank you</p>
  
  <p>Little update, 
  I think I did all good, now when I put to terminal: <code>java org.testng.TestNG Test.xml</code> 
  I've got this error:</p>
  
  <blockquote>
    <p>Exception in thread "main" org.testng.TestNGException:  No sourcedir
    was specified     at org.testng.TestNG.checkConditions(TestNG.java:1170)
      at org.testng.TestNG.privateMain(TestNG.java:1010)  at
    org.testng.TestNG.main(TestNG.java:997)</p>
  </blockquote>
  
  <p>all path are exported, so maybe this is wrong version of <code>testng.jar</code>, tried with versions <code>5.5</code>, <code>6.4</code>, <code>6.5</code>, <code>6.6</code>, <code>6.7</code> but I think only version <code>5.5</code> is working, </p>