commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject Re: [vfs] running unit tests for Http provider
Date Wed, 23 Jun 2004 09:55:35 GMT
Eric Pugh wrote:

>Something that
>could be an approach would be to have two modes:  Real and Mock.. 
Well, i use the local file provider to test if i do global changes on 
vfs, it is easy to setup and the core of vfs is tested well.
For this, and if i have problems with a special filesystem i use a 
RunTest class.

If this test passes, i startup my uml-linux and trigger the whole test 

>But again, if you have a system, then that works..
And never ever there should be a commit to vfs without testing the 
change against this system using ALL filesystems.

If you are interested in this uml-linux server, just drop me a note.

package org.apache.commons.vfs.test;

import junit.framework.AssertionFailedError;
import junit.framework.Test;
import junit.framework.TestResult;
import org.apache.commons.vfs.provider.webdav.test.WebdavProviderTestCase;

import java.util.Properties;

public class RunTest
    public static void main(String[] args) throws Exception
        Properties props = System.getProperties();
        props.setProperty("", "src/test-data");
        props.setProperty("test.basedir", "target/test-data");
        props.setProperty("test.policy", "src/test-data/test.policy");
        props.setProperty("", "false");
        props.setProperty("test.http.uri", "http://vfstest/vfstest");



        Test test;
        // test = FtpProviderTestCase.suite();
        // test = HttpProviderTestCase.suite();
        // test = LocalProviderTestCase.suite();
        // test = JarProviderTestCase.suite();
        // test = ZipProviderTestCase.suite();
        // test = TemporaryProviderTestCase.suite();
        test = WebdavProviderTestCase.suite();
        // test = UrlProviderTestCase.suite();

        // test = SmbProviderTestCase.suite();

        // test = SftpProviderTestCase.suite();

        TestResult result = new TestResult()
            public synchronized void addError(Test test, Throwable 

            public synchronized void addFailure(Test test, 
AssertionFailedError assertionFailedError)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message