question

xmac avatar image
xmac asked xmac posted

Response Map fails after there is a change in reponse.

I have sshsesion where I do  "show version"  and map the reponse to a reponse map. 

 

It was working fine until the reponse for  "show version" changed slightly.

 

Here is the screenshot with new reponse in which the reponse map not working.

Im getting a error like

 

fail      VerifyVersion           3            No matches found for query: Software_Release()

fail      VerifyVersion           3            No matches found for query: build()

 

I have attached both the reponse and the reponse map

 

reponse1.txt   ---> Reponse for which the reponse map works fine.

 

reponse2.txt  ---. New reponse for same command, for which reponse map fails

 

getVersion.ffrm  ---> Reponse map used.

 

 

Please note tha tI want to store only the red circled part in the screenshot.

 

iTest
reponse1.txt (386 B)
reponse2.txt (382 B)
getVersion.ffrm (5.1 KiB)
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

·
msandeep avatar image
msandeep answered msandeep posted

Hi Srijith,

 

I have created a common block response map for both the responses provided.

 

Please check the attached response map once.

 

Thanks,


block1.ffrm (12.8 KiB)
4 comments
10 |950

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

xmac avatar image xmac commented ·

Thanks Sandeep, But this response map is showing me following errors

Here Is im pasting the test report

 

Also ,  for the build() value I want to store including the "b" and the number attached to it... in this reponse  you can see  "b1"  or "b720"

 

Please set that the build value will have the charector "b"also.

Thanks again sandeep

 

Im getting the version info , but missing that "b" in build.

 

Rest everyting is working fine.... but shows error eventhought Im getting what I want. Becuase I want only   Software_Release and  build.

but build shud hav the  "b" charector also

 

 
Post-Processing:
  event OnResponseMappingIssue
  action DeclareExecutionIssue Error:Expected Word Token minutes; Received Word Token hours in block block1, line 9, col 29
  event OnMappingFail
  action DeclareExecutionIssue Error:Response has one mapping error. Map: project://project_ecds_cvs/response_maps/getVersion.ffrm
  action FailTest
  event OnTestResultChange
  event OnFailTestAction
analyze   contains Enterprise Content Delivery System Software: assert $value == 1
  assert value: 1; assertion: true
  action DeclareExecutionIssue OK:Response contains "Enterprise Content Delivery System Software"
  action PassTestIfNotAlreadyFailed
  event OnPassIfNotAlreadyFailedAction
analyze   store '2.5.5' at firstver
analyze   store '1' at build
  event OnFailedTestResult
  action DeclareExecutionIssue Error:Test case tc_upgrade_Ecds_Cli has failed.
0 Likes 0 ·
xmac avatar image xmac xmac commented ·

any updates on this sandeep, looks like the last line in the reponse is creating problem.

0 Likes 0 ·
lakshminarayana avatar image lakshminarayana xmac commented ·

Hi Srijith,

 

Take the second response as one more sample in getVersion.ffrm and add one more pattern then make tokens for Software_Release and  build.

 

Or you can modify the block1.ffrm file to include "b" character in the build token. Just replace the "b1" or "b720" with a "*", a number or an alphabet and then make token. Because, we cannot make a token in block mapping technology when the value contains combination of letters and digits.

 

Hope this will help you!

 

Regards,

Lakshmi

0 Likes 0 ·
getVersion.ffrm (8.1 KiB)
block1.ffrm (12.8 KiB)
sandeepreddynv avatar image sandeepreddynv ♦ lakshminarayana commented ·

Hi Srijith,

 

I have observerd the error you are facing while applying the response map, the error is showing as:

 

actionDeclareExecutionIssue Error:Expected Word Token minutes; Received Word Token hours in block block1, line 9, col 29

 

and here is the last two lines for the response which is taken from response 2.txt file:

 

System was restarted on Tue Feb 21 22:57:35 2012.
The system has been up for 3 minutes, 0 seconds.

I believe in your new response the last line is showing as hours, minutes and seconds. So, You just need to make the hours as optional word/token and you will not recieve the error again.

 

Hope it helps!!

 

Regards,

Venkat

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.