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

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

Categories

HOME
image
jdo
testng
listview
netsuite
openstack
raspberry-pi
objectgears
bpmn
android-4.4-kitkat
yarn
win32gui
callback
convolution
facebook-messenger-bot
cloudkit
windows-azure-storage
n-gram
commonmark
event-handling
try-catch
highlight.js
aurigma
http-status-code-504
plunker
kudan
php-openssl
angular2-aot
vlsi
url-scheme
user-interaction
bootstrap-material-design
uninstall
nhapi
dbclient
large-file-upload
socialengine
nameservers
http-status-code-503
contact-form
catel
noraui
subset-sum
environment-modules
revolution-slider
main
xcode-extension
gesture
libvpx
c11
unspecified
webdriver-manager
streamreader
bootstrapper
cookiecutter-django
awt
mapzen
grid.mvc
turbogears
logparser
hendrix
togetherjs
setter
jxcore
lift-json
pg-dump
pearson
epson
iso8601
topbeat
root-framework
setuptools
firmata
instant
probability-density
sts-springsourcetoolsuite
adxstudio-portals
multiple-regression
markojs
sigabrt
essence
dataview
bluegiga
hsv
vhd
maven-tomcat-plugin
cyclomatic-complexity
atk4
arcanist
device-orientation
gui-test-framework
socketexception
titanium-modules
valueconverter
mbr
c18
access-rights
padarn
mt
viewswitcher
netbeans-6.9
punbb
netdna-api
recent-documents
oncheckedchanged
xfbml
digest-authentication
jquery-ui-droppable
mirah
multi-tier
iweb
zend-decorators
commodore
rtml

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