maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlandman99 <mlandma...@gmail.com>
Subject Using dynamic properties in POM.XML
Date Fri, 01 Feb 2013 18:02:49 GMT
Hi,

I'm using Maven to help manage a automated testing project for integrated
system-level testing, not unit testing. The project holds the test code, but
the device under test is something completely separate. The first test grabs
the installer (located externally) and installs the product under test on a
remote machine, and then the test code in the Maven project runs remote
tests against that deployed product. Works great.

When it's complete, it generates a test report, via the usage of
surefire->testNG, and a customized report listener, reportNG. From the POM
file, re: reportNG:

...
<org.uncommons.reportng.title>Automation Test
Report</org.uncommons.reportng.title>

This ends up generating a wonderful test report.

I'd like this title to include the build number of the product under test.
This is different (and not directly tied to) the version of the Maven
project, which is the test code. I'd love to be able to do something like
this...

<org.uncommons.reportng.title>Automation Test Report: Product X
${externalProduct.buildNumber}</org.uncommons.reportng.title>

... if ${project.build.directory} was a global variable that I could set
DURING my testing before testing was complete (but after testing had begun),
and then by the time Maven got to generating the report, it would use the
value of that global variable, which I had set during the beginning of my
testing (part of my testing dynamically figures out what the most recent
version is for the device-under-test --- in other words, I don't know what
that is until run-time.

Is there any way to get this to work?

Thanks in advance!



--
View this message in context: http://maven.40175.n5.nabble.com/Using-dynamic-properties-in-POM-XML-tp5745373.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message