How to execute code before TestNG for ie. building up the test suite
i am using Selenium2 + TestNG + Maven2 + alot of other stuff. What I would like to do is to build the testng.xml (xml suite) on-the-fly upon test execution, because I would read those tests out of HP ALM QC via OpenTestArchitecture (OTA). Is there anyway to tell maven and surefire to NOT start TestNG immediately, instead to call a main method somewhere, where I could build my test suite via XmlSuite xs = new XmlSuite(); XmlTest xt = new XmlTest(xs); ... TestNG tng = new TestNG(); tng.setXmlSuites(suites); tng.run(); the purpose is also to capture all types of exceptions to be able to write back the results from TestNG into HP ALM QC via OTA. Recently I had a exception from String.format and it killed my whole script because it happened in my TestNG #AfterMethod Thanks :)
I think the best way would be to make things in the pre-integration-test life-cycle-phase and prepare there the testng.xml afterwards you can run the integration tests. The complete thing can be done via mvn verify You can start with a simple proof of concept.
Maven:Including jars from remote repository
tell maven to get JAR dependency from given URL
Repairslab software editing [closed]
what is the best way to upload file with javaee maven
Maven Error “cant find or load main class…”
I run a maven project with the package goal. I defined the main class in the manifest but I still cannot have the jar file run in command prompt. Why?
Why including bom doesn't work?
runtime deployment of decision table in KIE
java.lang.IllegalArgumentException: At least one JPA metamodel must be present
Defining suppressions filter in checkstyle.xml vs pom.xml - maven-checkstyle plugin
Missing artifact org.glassfish.jersey.media:jaxrs-media-moxy:jar:2.16 in Maven project in Eclipse ,what to do?
Sonatype Nexus 3 stuck on OnLine - Ready To Connect status for proxies
Jenkins get last test result when maven building fail
How can I make a goal optional in maven?
Cucumber Rerun failed features : Inconsistent filters: [#test1, #test, 23, 36]. Only one type [line,name,tag] can be used at once
Creating an external Maven packaging POM