About the MagmaTester
Last updated at 7:48 pm UTC on 9 September 2009
MagmaTestCase and MagmaCollectionTester test most of the functionality of Magma. If you make any changes to Magma code, it is highly recommended that you run these test suites as a regression check.
They test Magma in a multi-user fashion via the Ma Armored Code framework, using multiple Squeak images that may run on the same or different computers. OSProcess is recommended if you want the convenience running the entire test suite with "one-click".
First, it is important to know that the test cases turn on the WriteBarrier by default. For this to work, first be sure the NewCompiler package is loaded into the image (it is available from SqueakMap). Otherwise, you must turn off the WriteBarrier option:
MagmaTestCase allowWriteBarrier: false
Save the image.
Then run the following:
MagmaTestCase fullSuite maDebug
The current image will be saved as "_magmaTestConductor.image". OSProcess will be used to launch four copies of this image; "client1", "client2", "server", "server2". The test-"conductor" image is used to send requests to each of the other images.
On my circa-2004 laptop computer, the tests take over an hour to run.
More fundamental-level tests
Magma depends on the services of lower-level frameworks. These frameworks are assumed to work correctly for Magma to work correctly. Here are tests for the most critical supporting frameworks.
MaClientServerTester tests client-server module only, no Magma code is run.
MaClientServerTester kickoff
The following are standard SUnit testcases, runnable from the SUnit Test Runner browser:
- MaObjectSerializationTester tests the serialization module only, no client-server or Magma code is run.
- MaHashIndexTester and MaHashIndexRecordTester tests the back-end support for MagmaCollections at a lower-level. Both are medium-volume tests and may take a while to run.
- MaHashIndexRecordTester tests the formulas that enshape the MaHashIndexRecord structure.