Ghost Coder Posted June 25, 2021 Report Share Posted June 25, 2021 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) Quote Link to comment
BramJ Posted June 28, 2021 Report Share Posted June 28, 2021 Maybe there are additional, non-printable, characters appended to the string? maybe a carriage return or line-feed? Can see something about that in the VI Description text Quote Link to comment
Ghost Coder Posted June 28, 2021 Author Report Share Posted June 28, 2021 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'. Quote Link to comment
Ghost Coder Posted June 28, 2021 Author Report Share Posted June 28, 2021 I updated to HTML report and no issue. Still don't know what I changed to cause the ATML to stop working. I only remember changing the report path. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.