Jump to content

TestStand 2020 String Value Test - Always fails


Recommended Posts

I haven't used TestStand since version 2013, What am I missing?  I would like to send a string to a COM port and evaluate the response using a regular expression.   Using TS2020 Sequence Editor out of the box, with no customization.

Using a String Value Test Step Type.   Comparison type is "RegularExpressionCaseSensitive".  Also tried using String Compare, and IgnoreCase

The function's output "response" I am assigning to Step.Result.String.

The comparison always fails.  So my work-around is to make it a Log step, and evaluate in a subsequent step, but I'd prefer to have it all done in 1 step.

Regards,

Greg

Win 10, TS2020 (32bit), LV 2019 (32bit)

 

String Value Test.png

Link to comment

Thanks BramJ, you are correct, the result had some termination characters that were not removed by the function.   It seems the way TestStand evaluates Regular Expressions is that the expected string must address all characters.  I would assume that a -1 for not found would be a fail, and anything 0 or above would be pass, but it seems the "offset past match" must also equal the string length.

Next Problem:  (any report options I can adjust?)

Unable to load the XML Report.
At line 44 End tag 'tr:Test' does not match the start tag 'c:Limit'.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.