
The main migration concerns users of TextTest's traffic interception mechanism, now CaptureMock.

=========================================================
COMPULSORY MIGRATION
=========================================================

(1) "Traffic Mechanism" is now a separate project called CaptureMock
====================================================================
If you were using this, you will now need to also install the CaptureMock program.
You will also need to create files of the format it now expects. This will ordinarily consist
of two parts:

a) Generate capturemockrc files

   The way to do that is to run the conversion script as follows

   texttest.py -s traffic.ConvertToCaptureMock

   This will automatically create capturemockrc.<app> files as appropiate based on your collect_traffic* 
   settings in the config files. It may in some cases create more files than necessary so some duplicates
   for versions may be able to be deleted.

b) Adjust your config files

   All collect_traffic settings should be removed from the config files after doing (a). TextTest will
   refuse to start until they have been. In addition, you should enable capturemock by adding

   import_config_file:capturemock_config

   to your config file. 

(2) Base classes in intercepted Python traffic
==============================================

Once you've done that, if you have moderately complicated Python interception you may need some
CaptureMock migration.

Base classes are now handled correctly, i.e. listed explicitly in the traffic files. This means
that two previous conventions in the traffic files are now obsolete.

NewStyleInstance('Blah', 'blah1')

becomes 

Instance('Blah(object)', 'blah1')

while

raise Instance('MyException', 'myexception1')

will no longer assume MyException derives from Exception, this must be written/recorded explicitly:

raise Instance('MyException(exceptions.Exception)', 'myexception1')

There are two ways to fix this. The first, and most obvious, is to simply re-record the 
traffic files, when this will happen automatically. If that isn't possible, the next best option is
to modify them via the ModifyTraffic script. Paste the following onto your PATH somewhere

#!/usr/bin/env python

### migrate_traffic_from_3.20.py

import sys

lineIn = sys.argv[1]
pos = lineIn.find("NewStyle")
while pos != -1:
    parts = lineIn[pos + 8:].split("'")
    parts[1] = parts[1] + "(object)"
    lineIn = lineIn[:pos] + "'".join(parts)
    pos = lineIn.find("NewStyle")

if lineIn.startswith("raise Instance"):
    parts = lineIn.split("'")
    if "(" not in parts[1]:
        parts[1] += "(exceptions.Exception)"
    lineIn = "'".join(parts)
sys.stdout.write(lineIn)

and then run

texttest.py -s "traffic.ModifyTraffic types=RET script=migrate_traffic_from_3.20.py"

(3) Python interception and command line/client-server interception cannot write to the same file
=================================================================================================
This is only an issue if you are using both these functionalities.

TextTest will in future write python interception from CaptureMock to "pythonmocks.<app>" and other 
interception to "externalmocks.<app>". There is no need to rename if you are only using one of these,
as it will still find the "traffic.<app>" files for backwards compatibility. Files recorded in future
will have the new names, however, so you may wish to rename for consistency.

If you are using both, however, it will be necessary to separate this out via a simple script into 
the two new files as appropriate.

(4) Java Properties files and test_data_properties
==================================================
The ability to create and amalgamate specific properties files for Java programs seems to have been little used.
In practice people seem to use system properties most of the time, and ordinary properties files can of course use
the ordinary data file mechanism which is simpler than learning another format.

For simplicity this functionality is therefore gone. Usage can be replaced by either "interpreter_options" files to
provide properties via -D arguments to Java, or by simply adding the files via link_test_path. If you *really* miss
this functionality, drop me a line and I'll think about restoring it.

=========================================================
CHANGES IN DEFAULT BEHAVIOUR (OR PROCEDURE)
=========================================================

(1) Default value of batch_recipients
=====================================
Previously TextTest has always sent batch emails to $USER unless this was explicitly disabled.
As more and more people rely on the HTML reports alone and don't read the emails this was becoming
a pain. So no "batch_receipients" entry now means no email.

(2) Default behaviour of "Save" and "Save As" in the dynamic GUI with versions
==============================================================================
Previously, the default operation of "Save" has been to save the results with the version specified when running.
This has proved to be a bit unexpected in some cases, and hence the default behaviour is changed.

"Save" will always overwrite the file it has compared with, no matter what. If it is a new file, it will be saved
 without version identifiers.

"Save As" allows you to specify a version. The default version value is however "<existing version>" which will behave
like "Save". Selecting a version explicitly should behave as it does today.

(3) CaptureMock no longer produces trailing spaces
==================================================
This should be easy to just save, really a bugfix.
