Versions Compared

Key

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

...

Tools

Type

Notes

JUnit + JMock

Unit Testing

Dspace is tightly integrated with the database (see notes above) which makes this work hardercomplicates the task of creating a unit test

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

...

  • 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. Can allow performance testing via ContiPerf.
  • 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.

Tools

Given the existing approaches, it seems the tools to consider are:

  • JUnit
  • JMock
  • Selenium/HTMLUnit
  • ContiPerf