title: How Do I Run A TestNG TestSuite In IDEA/Eclipse Without An XML File?
body: <p><a href="https://stackoverflow.com/questions/21577547/how-to-create-testsuite-class-in-testng-without-xml-file">This question</a> shows how to run a TestNG suite programmatically without an XML file.</p>
  
  <p>However, when I run it from IDEA it just runs as a main method and the output is not in the test window, whereas the JUnit example in the question <em>does</em> appear in the test window.</p>
  
  <p>How can I configure a TestNG test suite from a Java class and have IDEA/Eclipse output the results in the test window?</p>