TestNG+Maven, I have a framework where a block of code generates the testNG.xml on runtime, so my problem is that when I execute the command - mvn test, it starts looking for the TestNG file which is still not there because the code to generate that TestNG.xml is yet not executed.
So I want to know an approach where whenever I execute mvn test, system should first execute a block of code (I already have that code which generates the TestNG.xml file) and pom.xml should pick the newly generated xml file and start running the test cases from newly generated testNG.xml.