Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
About the MagmaTester
Last updated at 2:38 am UTC on 24 August 2007
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".

Running the test

To test the class-evolution function, changes to test-classes MagmaContact and MagmaPerson are made. Extract these files to your image directory before running the tests.

MagmaContact.st
MagmaPerson.st

Then run the following:
  MagmaTestCase kickoff

A warning message will appear describing what's about to happen. If present, OSProcess will be used to launch four images; "client1", "client2", "server" and "test-conductor".

On my circa-2004 laptop computer, the tests take over an hour to run.

Functions tested with the SUnit test scripts

The following functions are specifically tested by the SUnit test scripts. This proves that these functions work in at least one scenario. For more information, see MagmaTestCase and its subclass.


It's important to understand that these tests run one particular scenario of each function. While I tried to make many of the scenarios robust instead of minimalist, it is still just one-scenario per function. For example, for the class-schema evolution test, it adds an instance variable to a superclass AND renames it at the same time.


In the real world, all scenarios are possible, it is therefore best to expect the unexpected.


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: