Hi,
Sorry, the automatic installation of the plugin only works the second
time maven torque-test:build-run-plugin is called. For reasons unclear to
me, the target looks for something to delete (which it does not find at
the first install and thus fails).
Thomas
On Tue, 6 Sep 2005, Thomas Fischer wrote:
Hi,
I have added into svn two suggestions how to reorganize the old runtimetest.
The problem with the old runtimetest were the following:
- one had to build the generator and the templates separately before
running the test
- it was testing the ant version of the generator and not the
maven-plugin.
- it had problems with the junit task definition, if it was called
with -Dmaven.jest.skip=true
- it was not a runtimetest, but instead it was testing the whole of
torque, and therefore should not be in the runtime part of the
project but reside in an extra location.
These problems have been solved with the two suggestions for the new test
(the functionality and test cases stay the same). They can be found if an
update is made on the trunks subdirectory of the torque svn. There, a new
external svn reference called "test" was added for the suggestions.
The first suggestion puts the test into a maven plugin. The plugin can be
found in the directory test/torque-test-maven-plugin.
The second suggestion creates a test project for the test, and does not need
a plugin. It can be found in the directory test/test-project.
The data needed to test the different databases can be found in the
test/profile directory. At the moment, only an example for mysql is added.
The directory test/base contains some additional scripts which enable one to
build all Torque subprojects before the test is started. For the second
suggestion (test project), this directory could also be merged with the test
project.
To try the first suggestion using the maven plugin, change into the directory
trunks/test/profile/mysql. Adjust the project.properties and project.xml to
fit your setting. Then, run the command
maven torque-test:build-run-plugin
which should install the test plugin and run the test.
At the moment, the plugin remains installed after the test. I did try to
uninstall the plugin automatically, but somehow this crashes at the next
installation of the plugin. I did not try this very hard, no idea whether
this could be brought to work.
To try the second suggestion using the test project, change into the
directory trunks/test/profile/mysql. Adjust the project.xml to contain your
db driver, put your generator settings into project.properties and the
runtime settings in Torque.properties. Then, change into the directory
trunks/test/test-project and run the command
maven -Dtorque.test.profile=mysql torque-test:build-run-project
These suggestions are not meant as a final stage. Documentation is missing,
as well as some licence headers, and some formatting issues are
open.
I'd like to hear your opinion about which test setup suits you better. If you
prefer none of the two scenarios but wish to stay with the old runtimetest,
I'd be interested in ideas how to solve the problems with the old
runtimetest. If you have problems in trying the suggestions, email to the dev
list.
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]