question

keenanjohnson avatar image
keenanjohnson asked keenanjohnson posted

Analysis Rule Checking if CLI contains a Variable

Hello. I am using iTest to open a file using the readFile command. I then want to check if the value of a variable is contained within the file. So I use the analysis rule wizard to check if the the response contains a variable I have created. So in the wizard's "Text that must appear box" I enter $variable. However, when the wizard finished it puts a \ in front of that. So it says it is extracting \$variable. Then in the test report, it never does the substitution. Is there any way to make it look for the value contained in the variable? Any help would be appreciated. Thanks.

 

- Keenan Johnson

iTest
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JeffJ avatar image
JeffJ answered JeffJ posted

You should be able to remove the backslash and iTest will see the $variable, resolve it first and then proceed with the analysis.  The backslash is telling iTest to take the dollar sign literally and not do the substitution first.

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

keenanjohnson avatar image keenanjohnson commented ·

ok yeah I tried that a few times and it told me that I could not edit the analysis rule. However, this time it worked. Thanks for your help.

 

- Keenan

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.