...
- Scope of the project
- Work to be delivered by mid-term (mid July)
- Work to be delivered by end of GSOC (9th August)
- Documentation to provide
- Weekly reports to follow progress
Important aims are:
- to get some general agreement amongst the community about which testing frameworks we concentrate on, and how we get those tests to run automatically,
- provide systems and framework implementations around the units tests that facilitate the task, motivating the community to contribute to the effort
Existing approaches
So far there's been some approaches to the problem. As far as we know, the following:
- Elliot Metsger created some unit testing framework as shown at http://presentations.dlpe.gatech.edu/proed/or09/or09_052009_4/index.html
- Scott Phillips did a set of functional tests for DSpace 1.5 as seen at http://scott.phillips.name/2010/04/dspace-functional-tests/
- Gareth Waller has built a set of Selenium tests as commented recently in the developer's list
Next there is a table that compares these and some other approaches to the problem:
Tools | Type | Notes |
---|---|---|
JUnit + JMock | Unit Testing | Dspace is tightly integrated with the database (see notes above) which makes this work harder |
JUnit + HTMLUnit | Functional | Uses a embedded webserver to run Dspace and runs the tests, using ant, against this instance |
Selenium | Functional | Can be run against any running Dspace instance and using several browsers |
JUnit + ContiPerf | Unit Testing + Performance Testing | Suffers from the same issues as other Unit Tests, tight integration with database |
As we see we have two main approaches:
- Unit testing: automated, suffers from tight integration with database. Refactoring of code would be advisable, but it can be avoided by using Mocks. Tests at low level, just ensuring a class is correct, not checking the whole functionality.
- Functional testing: doesn't suffer from database integration. Ensure the functionality works, but it may not account for certain situations that would raise errors due to code bugs.
Both would benefit DSpace, as unit testing would ensure code quality while functional testing would ensure the application behaves as expected with standard usage.