I would love to try out uml-linux.. Unfortunantly I'm a windows user who has just dipped his toe in linux waters, so it'll be a while until I'm up to running uml-linux.
Eric > -----Original Message----- > From: Mario Ivankovits [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 23, 2004 11:56 AM > To: Jakarta Commons Developers List > Subject: Re: [vfs] running unit tests for Http provider > > > 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 > chain. > > >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. > > > ---RunTest--- > 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("test.data.src", "src/test-data"); > props.setProperty("test.basedir", "target/test-data"); > props.setProperty("test.policy", "src/test-data/test.policy"); > props.setProperty("test.secure", "false"); > props.setProperty("test.smb.uri", > "smb://vfsusr:[EMAIL PROTECTED]/vfsusr/vfstest"); > props.setProperty("test.ftp.uri", > "ftp://vfsusr:[EMAIL PROTECTED]/vfstest"); > props.setProperty("test.http.uri", "http://vfstest/vfstest"); > > props.setProperty("test.webdav.uri", > "webdav://vfsusr:[EMAIL PROTECTED]/vfstest"); > > props.setProperty("test.sftp.uri", > "sftp://vfsusr:[EMAIL PROTECTED]/home/vfsusr/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 > throwable) > { > throwable.printStackTrace(); > } > > public synchronized void addFailure(Test test, > AssertionFailedError assertionFailedError) > { > assertionFailedError.printStackTrace(); > } > }; > test.run(result); > } > } > ---RunTest--- > > -- > Mario > > > --------------------------------------------------------------------- > 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]