maven


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.

Related Links

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

Categories

HOME
winforms
clips
oracle11g
drivers
reserved
google-play
nullpointerexception
bpmn
microservices
ebean
upload
volttron
rascal
ibm-odm
uitypeeditor
progressive-web-apps
tostring
google-search-api
h2db
entitlements
unboundid
nouislider
oracle-fusion-middleware
catch-all
stringtemplate
html5-fullscreen
angularjs-factory
ensembles
galen
gulp-sourcemaps
g-code
nomethoderror
wso2carbon
fault
scrollable
errordocument
jquery-nestable
dotnetzip
composite-key
boost-preprocessor
flutterwave
spring-cache
dwscript
topbeat
player
actionbardrawertoggle
livequery
spim
qdialog
iis-arr
event-bubbling
skos
device-orientation
csquery
java.util.concurrent
rdl
mysql-error-1062
bundles
java.nio.file
mysqltuner
access-rights
seed
pygit2
robotics-studio
itmstransporter
bitsharp
viewswitcher
jspinclude
work-stealing
gnustep
pydot
propagation
oncheckedchanged
sudzc
dentrix
genealogy
multiple-languages
.net-1.0
3gp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App