Documentation › Recorder Export Template
Export Template in the MaxTAF Recorder
The MaxTAF Recorder is the Chrome extension that records what you do in IBM Maximo and exports it as an MXML test case. In version 2.1.0 you can give it your own case file, an export template, to wrap the recorded steps. The recorder puts the case name and the steps into your file and uses the rest of it as you wrote it. Your exported cases then have your team's set-up, tear-down and reporting in place when they arrive.
What it is
Each case the recorder exports has two parts: the steps you recorded, and the case code around them. The case code is the <testCase> element, the set-up that starts the browser and the reporter, and the tear-down that closes them. Before 2.1.0 the case code was the recorder's built-in layout. With an export template, you supply it.
A template is an ordinary .mxml file with two placeholders:
{{testname}}is replaced by the case name (spaces become underscores). It is optional.{{script}}is replaced by the recorded steps.
The recorder uses all other text in the file as written. You set the template in Configuration ▸ Export & Run params ▸ Export Template.
The shape of a template (the built-in one, shortened. Use Download to get the full file)
<testCase name="{{testname}}" xmlns="http://www.maxtaf.com" xmlns:ui="http://www.maxtaf.com/ui" ...>
<beforeTestCase>
<initializeApi />
<ui:createDriver>
<ui:timeout>20</ui:timeout>
</ui:createDriver>
<ui:javaScriptExecutor />
<addReporter type="xml" name="Test Title" description="Test Description" class="Test Class" author="Author" />
</beforeTestCase>
<test name="test{{testname}}">
<addTestReport name="test{{testname}}" />
<ui:maximizeWindow />
{{script}}
<testReportStatus>PASSED</testReportStatus>
</test>
<afterTestCase>
<ui:close />
<closeReporter />
</afterTestCase>
</testCase>
To make it your own, you edit this file. For example, you put your report details into <addReporter>, or you add your standard opening steps above {{script}} and your closing steps below it.
Why we built it
Many teams that test Maximo have a standard way to start and finish a case. This can be a particular login, a report header with the team's names in it, a parameter that each case reads, or a company convention for how a case is laid out. A recorded case gives you the steps quickly. But if your conventions are different from the recorder's layout, someone must open each exported case and add them by hand. That is the same edit on each case, and it is easy to forget one.
| Case written by hand | Recorded case, built-in layout | Recorded case, your export template | |
|---|---|---|---|
| Time to create the steps | Slower: each step written and its locator found | Fast: recorded as you work | Fast: recorded as you work |
| Follows your house conventions | Yes, written in by the author | Only after you add them | Yes, from your template |
| Edits after export | Not applicable | Your standard blocks, added to each case | Only changes to the steps |
A hand-written case follows your conventions, but it takes time to write. A recorded case is fast, but it comes out in the recorder's standard layout. An export template gives you both: the recorder supplies the steps, and your file supplies the conventions.
Your conventions in each case. Recording speed kept.
- Exported cases arrive with your set-up already in place. Steps that you put above
{{script}}, such as a login or a parameter read, are in the case when you open it. - Exported cases arrive with your tear-down already in place. Closing steps that you put below
{{script}}run at the end without an edit after export. - Exported cases arrive with your report details already filled in. The reporter name, description and author come from your file, not from placeholder text that you must replace.
- Exported cases arrive in one layout across the team. When each person uploads the same template file, the cases they record share one structure, so they are easier to review side by side.
How to get started
- Download a starting point. In the recorder, open Configuration ▸ Export & Run params and find Export Template. The status line shows Using the default template. Click Download to get the built-in template as
export-template.mxml. - Edit the file. Add your set-up, tear-down and report details. Keep exactly one
{{script}}and the<testCase>element. - Upload it. Click Upload .mxml and choose your file. The file must be valid MXML, saved as
.mxmland not.xml, because an.xmlfile causes problems in MaxTAF. The recorder checks that the file has exactly one{{script}}and a<testCase>. If a check fails, the recorder shows The template was not saved. and the reasons, and keeps the template it had. If the file passes, the status line shows Using a custom template: your-file.mxml (uploaded <date and time>). - Record and export as usual. Export Case (whether it uploads to MaxTAF or only saves a file) and the MaxTAF-for-Maximo
.mxmldownload now use your template. To go back to the built-in layout, click Use default.
The template applies in Maximo recording mode only. Copy all as MXML copies the steps only, without the template.
The template is kept in the recorder in your own browser. It is not shared with other users, so each person on the team uploads the file. Download gives you the template in use, so you can pass it on.
The built-in template includes the namespaces from the Custom Namespaces setting. When you download the built-in template, the namespaces from that setting are already written into it. A custom template uses the namespaces written in your file. If you change that setting later, update your file too.
The automated case creation that MaxTAF's AI tester uses also applies a stored template, but a template cannot be set through those automated commands.
Keep a copy of your template file. If you update the recorder by replacing its files and clicking Reload, the template stays. If you remove the recorder from Chrome, or load a new version from a different folder, upload the file again.
Artefacts
| Setting up a template, step by step | Recorder Guide — Using your own export template |
| All recorder settings | Recorder Guide — Settings reference |
| The MXML language | MXML Reference |
| Also in Recorder 2.1.0 | Stored variables you can reuse · Parameters in typed values |