Replaying Actions

After loading the profile class, click the Replay Last button. An instance of the newly-generated class is then created and its startup and runTest methods are called.

If a list is being replayed, the startApplication method is called for each profile class in turn. Each profile class must therefore assume that only the standard forms are open when recording starts. The required state of the persistent database is under your control; for example, you can create an object in Test1 that is used in Test2.

The AtcgReplayApp application should work in standard client, presentation client, or single user mode. The AtcgReplayApp application itself does not currently permit multiple copies running, but you can easily write a harness that supports this. The essential code is as follows.

vars
    tran: AtcgProfile;
begin
    app.initialize;
    create tran as name‑of‑your‑transient‑profile‑class transient;
    tran.startup;
    tran.runTest;
    tran.stop;
epilog
    delete tran;
end;

The class names could be read in from a flat file, for example, and looked up with something like a currentSchema.getClass(className) method.

The app.initialize method call can vary, according to the requirements of your tested application.