title: how to execute a testng xml file from the bash command line?
body: <p>Looking to <a href="https://askubuntu.com/q/1355494/847449">use</a> this <code>test.xml</code> from <code>bash</code>:</p>
  <pre><code>nicholas@mordor:~/NetBeansProjects/testng_gradle$ 
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ echo $CLASSPATH
  /usr/share/maven-repo/org/testng/testng/debian/testng-debian.jar
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ 
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ ls /usr/share/maven-repo/org/testng/testng/debian/testng-debian.jar
  /usr/share/maven-repo/org/testng/testng/debian/testng-debian.jar
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ 
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ cat test.xml
  
  
  &lt;suite name=&quot;Hello World&quot;&gt;
  &lt;test name=&quot;simple test&quot;&gt;
  &lt;classes&gt;
  &lt;class name=&quot;testng_gradle.TestApp&quot; /&gt;
  &lt;/classes&gt;
  &lt;/test&gt;
  &lt;/suite&gt;
  
  
  
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ 
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ tree
  .
  ├── app
  │   ├── build.0
  │   ├── build.gradle
  │   ├── src
  │   │   ├── main
  │   │   │   ├── java
  │   │   │   │   └── testng_gradle
  │   │   │   │       └── App.java
  │   │   │   └── resources
  │   │   └── test
  │   │       ├── java
  │   │       │   └── testng_gradle
  │   │       │       └── AppTest.java
  │   │       └── resources
  │   └── test.xml
  ├── gradle
  │   └── wrapper
  │       ├── gradle-wrapper.jar
  │       └── gradle-wrapper.properties
  ├── gradlew
  ├── gradlew.bat
  ├── settings.gradle
  └── test.xml
  
  12 directories, 11 files
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ 
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ cat app/src/test/java/testng_gradle/AppTest.java 
  /*
   * This Java source file was generated by the Gradle 'init' task.
   */
  package testng_gradle;
  
  import org.testng.annotations.*;
  import static org.testng.Assert.*;
  
  public class AppTest {
      @Test public void appHasAGreeting() {
          App classUnderTest = new App();
          assertNotNull(classUnderTest.getGreeting(), &quot;app should have a greeting&quot;);
      }
  }
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ 
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ java org.testng.TestNG test.xml
  Error: Unable to initialize main class org.testng.TestNG
  Caused by: java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ 
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ uname -a
  Linux mordor 5.11.0-25-generic #27-Ubuntu SMP Fri Jul 9 23:06:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  nicholas@mordor:~/NetBeansProjects/testng_gradle$ 
  </code></pre>
  <p>The example command is:</p>
  <pre><code>java org.testng.TestNG testng1.xml
  </code></pre>
  <p>is the problem with the <code>xml</code> configuration file perhaps?  Can't see how that would relate to the error above.</p>