Have played some more with this, and the postgis online tests...
AbstractPostgisOnlineTestCase does this...
protected void setUp() throws Exception {
super.setUp();
//connect
fixture = PostgisTests.newFixture("fixture.properties");
Map params = PostgisTests.getParams(fixture);
which seems to load the local fixture if it is present, regardless of
the fixture properties in ~/.geotools
and I'm still not sure if/how a profile sets up particular fixtures to
use - it seems these are pretty much hardcoded in the test cases.
Thinking about this further, this is what I want to do:
1) by default test against local resource. This means create "local
test" cases where the user must install a local resource and install a
fixture properties. If these are missing, the fixture is missing so the
test gets skipped, the module should build, but really wont have
adeqaute testing - this seems to be borne out by postgis tests being
nearly all Online....
2) When using the online profile, run the same tests against a
_different_ fixture - pointing to the online resources.
it seems to be working counter-intuitively at the moment - I have to
edit fixture files for each type of test I want to run, in spite of
having a fixture loading process.
3) modules should be distributed with
reosurces/../profile/named fixture.properties tree, that is used as is,
unless overidden by
~/.geotools/module/profile/namedfixture.properties
4) and each module distrubutes namedfixture.template files, including
sufficient comments to allow a novice (for the technology concerned) to
set up local copies of the resource - eg set up the appropriate database
schema.
5) a maven target to copy all template files to the users directory for
convenience would be a nice touch later
The only issue with this is finding the profile name when looking for
files, but somehow this must be available for Online to be ignored or
included...
Rob Atkinson
Jody Garnett wrote:
> * # located in C:\Documents and
> Settings\USER\.geotools\postgis\typical.properties
> * namespace=http://www.geotools.org/data/postgis/
> * host=localhost
> * port=5432
> * database=geotools
> * user=postgres
> * password=****
> * schema=public
>
> A couple of comments:
> - finding your "home" directory is not usual practice for windows users
> - creating a .geotools directory is hard for a windows user (a leading
> "." is not cool)
>
> Is there any chance we could aquire these from the root of the GeoTools
> checkout? Answer no - since the user may of just checked out a single
> module.
>
> Can we rename ".geotools" to "geotools" (even if just on windows boxes).
>
> Jody
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel