Bug 7046 - Add test suite infrastructure
: Add test suite infrastructure
Status: RESOLVED FIXED
: Nimbus
Workspace service
: 2.4
: PC Linux
: P3 normal
: 2.5
Assigned To:
:
:
: 7045
: 7013
  Show dependency treegraph
 
Reported: 2010-06-09 14:58 by
Modified: 2010-07-01 15:46 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-06-09 14:58:16
Based on work in Bug 7045, begin a test suite infrastructure that allows the
test writer to instantiate entire spring contexts (and databases etc.) for an
integrated workspace-service situation (as opposed to small unit tests). 
Instantiation and teardown should be possible "at will" and should be
"idempotent" so they can be run over and over.  This is not about adding a lot
of tests themselves, but the infrastructure (which will be possible when 7045
is complete).
------- Comment #1 From 2010-06-09 16:31:19 -------
First attempt at this is merged to master for Nimbus 2.5, see this group of
commits:

  http://github.com/nimbusproject/nimbus/compare/b643c45...0528bc7

See the developer README:

 
http://github.com/nimbusproject/nimbus/blob/master/service/service/java/tests/suites/common/README.txt

In the future, we are thinking of making this work from a template
programatically.  You could take a "prefabricated" layout of
etc/nimbus/worksapce-service on the filesystem, load it into Spring but only
conditionally, change what configurations need to change for a particular
test/suite *in code*, and only *then* instantiate the whole Spring context and
run those tests.

That will take some effort: we are accepting this test suite style for now (see
README).  It works and is an enormous improvement over the previous unit-test
only situation.
------- Comment #2 From 2010-07-01 15:46:51 -------
Thanks to Paulo Ricardo Motta Gomes, this test suite now is more reusable with
multiple runs after his integration with the Spring @DirtiesContext feature.

http://github.com/nimbusproject/nimbus/commit/ab6f4cb010339091ce274a77e02bad81f00b2a4d

http://github.com/nimbusproject/nimbus/commit/dfaff3ec992cfb81116741a64a912472a2345bcc