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.
OpenShift maven plugin
Serving GWT Dependency in .war Project
Getting an unexpected exception in NetBeans
Maven tomcat plugin - how to fail build if deployment fails
how to use maven command to deploy war package to local tomcat
VM Options missing for Maven Project
Create Symlink for dependencies in Maven assembly
Gradle - get jar and native lib from Maven (snapshots) repository
Skinny war and log4j
Maven same dependency on different scopes
executing shell script and ant script with named parameter using maven
Can I produce both jar and war of a project in maven?
How can I set Jenkins to display “Build failure” on failure of test cases?
ant command for block replacement
Mule devkit Error: [ERROR] Could not create MANIFEST for Studio plugin: Attempt to reopen a file for path MANIFEST.MF
IntelliJ Error : “Cannot Resolve Symbol” in all Maven and Gradle Dependencies