Tim,

Yes, I've created a Jira issue:

http://jira.dspace.org/jira/browse/DS-536

The test cases them selfs can be put into modules, but at least with the 
current implementation the final dspace maven project needs to be modified. I 
see mark has an email along similar lines, I'll say more in that email. 

Thanks.

Scott--

On Apr 6, 2010, at 9:10 AM, Tim Donohue wrote:

> Hi Scott,
> 
> I think DSpace Functional Tests would definitely be of interest to the DSpace 
> Community.  At a quick glance, this seems like a good starting point for a 
> Functional Testing framework -- though I'd like to get others opinions as 
> well obviously.  In my opinion, DSpace needs more automated testing (Unit 
> Tests, Functional Tests, etc) in general.
> 
> Would you be willing to add an entry for this in Jira?  That way we can have 
> it as a reminder of the code, and get some more eyes on it? Alternatively (if 
> TDL was willing), we could even start to move the code into the SVN Sandbox 
> (or SVN Modules, if we could separate all/most of it into its own Maven 
> module or set of modules.):
> 
> http://scm.dspace.org/svn/repo/sandbox/
> http://scm.dspace.org/svn/repo/modules/
> 
> Perhaps others could even help write some various functional tests for other 
> interfaces (JSPUI, OAI-PMH) if we could get this code into an area where 
> others could start to play with it.
> 
> Thanks!  It looks like very useful work so far -- just a matter of getting 
> others eyes on it, and seeing if others can help build more functional tests.
> 
> - Tim
> 
> On 4/4/2010 3:21 PM, Scott Phillips wrote:
>> DSpace Functional Tests?
>> 
>> The Texas Digital Library has been focusing on testability for our
>> projects. Since DSpace is related too or part of most of our projects
>> we’ve been looking for a way to increase DSpace’s testability.
>> Traditionally this would mean adding unit tests and integration tests.
>> However as DSpace currently stands is hard to break it up into
>> individual components that can be tested in isolation. You’ll quickly
>> find that writing tests for DSpace pull in the entire system, plus
>> databases, and a file system. To address this problem we’ve created a
>> simple framework for adding both integration tests and functional tests
>> which improve the reliability of our projects. I’m interested to see if
>> this is something the greater DSpace community would be interested in?
>> 
>> The goals of our project were to create a mechanism where we could run
>> complete functional tests. Functional tests evaluate the entire system
>> as the end user would use it, so think of it as opening a web browser
>> and evaluating the output – but completely automated. They test
>> everything all together. Ideal it would be better to test each component
>> individual, but this is in practical for DSpace for two reasons 1)
>> DSpace is highly integrated and nearly impossible to separate from the
>> database and file systems, 2) Creating unit test for all of DSpace is
>> very time consuming it is simpler to write a few functional tests that
>> cover a wide set of features over the whole application. It gets you to
>> a point where you can reliably verify the software quicker. If you’re
>> working on unit tests for DSpace please do not let this stand in your way.
>> 
>> The main concept is to script the install of a test DSpace, with a full
>> configuration and setup. Then we start DSpace in an embedded webserver
>> and then run through several scenarios just as a normal user would. This
>> tests the whole application, using a database, a file system, and a full
>> build. The ant script where you normally run “ant fresh_install” has a
>> new target “ant test”. You pass it a few parameters such as what
>> database to use. The script will then run through a fresh install of
>> DSpace into a local /test directory, setup some communities and
>> collections, and import some basic items. Then JUnit-based tests are run
>> against the embedded webserver using HtmlUnit to simplify verifying the
>> HTML output.
>> 
>> Here is how to run it. After compiling using a “mvn package”, cd into
>> target/dspace-*-build.dir/ directory. Then run “ant test” you may need
>> to pass it some parameters as listed below. Each parameter has a default
>> so if you configure you’re database connections the same way then it can
>> be as simple as running “ant test” without any parameters.
>> 
>> -Dtest.db.driver="org.postgresql.Driver"
>> -Dtest.db.url="jdbc:postgresql://localhost:5432/dspacetest"
>> -Dtest.db.username="dspacetest"
>> -Dtest.db.password="dspacetest"
>> -Dtest.dspace.dir=”./test/"
>> -Dtest.config=”./test/config/dspace.cfg"
>> 
>> We’ve used this approach rather successfully for two of our DSpace-based
>> projects here at TDL: an ETD submission system called vireo, and a
>> learning object repository. These projects haven’t moved to 1.6 yet, but
>> I do have a patch available for DSpace 1.5.2. Most of the test cases
>> we’ve created so far are specific to the project we’re working on.
>> However the patch includes 4 manakin tests, which are really just an
>> example of how tests work within this framework.
>> 
>> Download the patch:
>> http://scott.phillips.name/wp-content/uploads/2010/04/DSpace-1.5.2-FunctionalTest.patch.txt
>> 
>> The question is, is this something that the DSpace community would like?
>> 
>> Scott--
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> Download Intel® Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> 
>> 
>> 
>> _______________________________________________
>> Dspace-devel mailing list
>> Dspace-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dspace-devel


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to