Can I Verify or FuzzyVerify more than one string at the same time?

Can I Verify or FuzzyVerify more than one string at the same time?

No. The two types of verify can only deal with single strings, so if it is necessary to verify a string that is composed of multiple strings in one go (e.g. to verify a set of data fields), use the following workaround:

 [ ] string sField1
 [ ] string sField2
 [ ] string sField3
 [ ] string sField4
 [ ] string sActual
 [ ] string sExpected
 [ ] sField1="Our"
 [ ] sField2="Software"
 [ ] sField3="Lexington"
 [ ] sField4="MA"
 [ ] sExpected="Our Software Lexington MA"
 [ ] sActual=sField1+Space(1)+sField2+Space(1)+sField3+Space(1)+sField4
 [ ] Verify(sActual,sExpected)

Note that the Space(n) function is added to make any output text more legible, especially if the test is written to the .res file. It is not strictly needed; sExpected could have been written as


and the test would still have passed if the Space(n) commands were omitted.



Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:19
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.