title: Failed to run dynamically created source file in TestNG
body: <p>Currently, I am working in an automation project where I need to create one source file and testng.xml file dynamically. The TestNG is getting the xml file but not the source file created dynamically. It's showing error message while I am running the system for the first time:</p>
  
  <pre><code> org.testng.TestNGException: 
   Cannot find class in classpath: domain.companyname.customsuite.CustomTestcase
   at org.testng.xml.XmlClass.loadClass(XmlClass.java:81)
   at org.testng.xml.XmlClass.init(XmlClass.java:73)
   at org.testng.xml.XmlClass.&lt;init&gt;(XmlClass.java:59)
   at org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:543)
  </code></pre>
  
  <p>But after refreshing the project it's running fine.</p>
  
  <p>How can I run the dynamically created source file using TestNG?</p>