Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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:

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.