Hi Arun,
when you run test in Intellig, testNG xml file is always created. You can see the path to this file in Intellij console.
For example:
[TestNG] Running:
C:\Users\Libor\.IdeaIC2016.2\system\temp-testng-customsuite.xml
So you just start and stop the test and copy this file to your folder.
This probably is not the most comfortable way, but it works fine for me ;-)