How to use concatenation to manipulate text in action arguments.
Before proceeding: Ensure that you are logged in to
the SampleRepository. In the TestArchitect explorer tree, expand the Car
In the TestArchitect explorer tree, select any item within the
current project, then click Create new test module
in the toolbar.
The New Test Module dialog box appears.
In the Name field, type My
expressions, then click Create.
The new test module appears in the editor
with a default template containing suggested basic components for a
well-designed test. For this lesson, you only need the TEST
In the editor, delete all content except for the TEST CASE
line. Optionally, you can also delete any blank lines above the TEST
You are now ready to begin writing your action lines.
In the third column of the TEST CASE line,
provide a useful description, such as string ops.
Enter the following action lines:
report Pickup city: Dallas, Texas, USA
report # "Pickup city: " & "Dallas" & ", " & "Texas" & ", " & "USA"
Your test case should now resemble this:
With your test module displayed in the TestArchitect editor, click
on the toolbar.
The Execute Test dialog box appears.
The status bar (at the bottom left of the TestArchitect window)
indicates the stages of the test as it progresses. Upon test completion the
newly generated results page is displayed.
The argument of the first report action line (row 15) is treated
as a literal string, requiring no further evaluation. By contrast, the second report
action line begins with a # symbol, and so is treated as an expression. It uses the
concatenation operator (&) to merge several string constants.
Note: Note that, within an expression, string constants must be enclosed in
quotation marks. An argument cell containing only a simple text string, as in row
15, needs no quotation marks.
The results in both cases are identical: