db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vemund Ostgaard <Vemund.Ostga...@Sun.COM>
Subject Running the junit testsuite with a remote server
Date Mon, 17 Sep 2007 13:17:21 GMT
I'm interested in running the junit tests with a remote server, but as 
far as I can see there is no easy way to do so yet.

I found two relevant jiras:
https://issues.apache.org/jira/browse/DERBY-1973 (Support running JUnit 
tests directly with a remote server)
http://issues.apache.org/jira/browse/DERBY-2638 (Create an option for 
junit tests to run only client tests)

As these are currently unassigned I was thinking of taking a closer look 
myself.

A couple of questions:

What interface should be used to instruct the test framework that you 
want to use a network server (probably started manually) running on a 
given host & portnumber, instead of the default localhost location? And 
along the same lines, what is the best way to instruct the test 
framework that you want to run only the "client tests" (or only the 
"embedded tests")?

For choosing to run only a subset of tests, like the "client tests", I 
see a few possibilities:
* Create some new top level suite, for instance "Suites.client" that 
runs only the "client tests".
* Set a property (on the commandline) when starting Suites.All (or any 
other subsuite) that instructs the framework to only run the "client tests".
* Make it possible to do both of the above.

For instructing the framework to use a specific hostname and portnumber 
instead of the defaults I don't have any good ideas except using 
properties. The DERBY-1973 report says "Ideally this would be through a 
test decorator and not setting properties on the command line.", though. 
Any suggestions on the best way to solve this? The TestConfiguration 
class seems to read system properties for framework (embedded or 
client), hostname and port, but is this code there only to make the 
tests run under the old harness and intended to be removed when all the 
tests are converted?

Is it likely that all "client tests" will work with a remote server, or 
will some tests be written in a way that requires the server(s) to run 
on the same host as the test framework? Perhaps some tests have to start 
the networkserver as part of the test, and because of this it has to run 
on the same host. In this case it would actually be three groups of 
tests: embedded, local networkserver and remote networkserver.

If anyone has given all of this some thought I'd be happy to hear.

Vemund

Mime
View raw message