>> >It would be good, but only the offline tests, the online tests
>> >are too much unreliable.
>>
>> Maybe a 3rd gump project?
>
>
>I'm not sure the online tests should be part of gump. Actually, I often
>think that online tests should be replaced by more reliable
>tests, because
>most of the time they fail only because the online resource is
>not available
>(we have tests relying on ibiblio for instance, and they often
>fail with
>timeouts). Moreover they are very slow compare to other tests,
>so running
>them is tedious. So I don't know if we should get rid of those
>tests, or
>rewrite them using jetty for instance for http tests... I'm
>not familiar
>with this kind of tests which start a web server, that's why I
>never took
>time to rewrite the tests. But if somebody can help, it would be really
>nice.
Could you check the online resources before running the test?
public void testOnline() {
if (onlineAvailable()) {
assertHttpResponse("http://ant.apache.org", 200);
} else {
log("Could not test Ant-Website because there is no access to
the internet.");
}
}
public boolean onlineAvailable() {
// switch the check off for strict tests
if (System.getBoolean("ivy.tests.strict") return true;
// check the availability of resources
}
In that way you could having them but you dont rely "really" on them ...
You could also split the online tests and the offline tests.
<target name="test" depends="test.online,test.offline"/>
<target name="test.offline">
...
</target>
<target name="test.online" if="test.online">
...
</target>
So you could run only the offline tests for faster execution.
Jan