If you’ve never heard of them, that’s probably for the best but they’re always worth discussing.
Most actions in the system that needs automation can be done through processing script (changing the date, running a report, checking DB results, etc…) or through the workflow or specific interface (importing trades, market data, etc…). But in some cases, you might need a function in the system to do something automatically and it is not automated at all.
It usually ends up in a meeting where people look for solution till someone mentions: XML Macros.
What are XML macros? XML macros allow to automate a certain path in the application as if someone was entering all the relevant information and clicking on the appropriate fields. Recording your macro generates an XML file that you can then load via a script (on paper sounds perfect for automation).
The extra bonuses of XML Macros are that you can modify the XML yourself (for instance, username/password groups or any other typed fields) very easily AND that they can open up a session up exactly at their very end. (For instance, choosing a portfolio and loading the simulation).
On paper, looks great and feels like a bulletproof solution. Unfortunately, I tend to run away when they’re mentioned for quite a few reasons:
– They each have their own JVM. So if you plan to use them to ease the user access into the system, the user machine might end up out of memory as each session will eat up 250-500 Mo (depends a bit as to what the user is doing)
– They’re completely dependent on path built: if the path changes for whatever reason (change of version, change of configuration), the macro will need to get rewritten to adapt to the new version
– If username/password changes, one needs to look into it as well and update them.
Automation is often a set and forget solution, but in the case of XML macros, at each change (and on a regular basis) they need to be checked as they might stop working.
If automation is absolutely required and XML macro is the only solution, you need to consider an extra check post the XML macro run to ensure that the job was done properly (usually a good old DB check processing script is perfect).
If you have stories or tips about using them, feel free to share below!