question

dclaar avatar image
dclaar Suspended asked dclaar Suspended posted

Why does this query not match?

I created a query, interface_status_up, that looks like this:

//Row[interface='{0}']/interface_status

Then I created a second query, lo_status_up, that looks like this:

interface_status_up('l0')

iTest tells me that this query doesn't match. So I created a third query, lo_status_up_1:

//Row[interface='lo']/interface_status

And  iTest tells me that the query matches! And this related query, bvi0_status_up:

interface_status_up('bvi0')

Works fine; iTest finds it no problem! This seems like a bug to me; at the very least, it is wicked inconsistent. I've attached a simple test case to reproduce it. This is in 4.0

 

 

iTestresponse mapbug
rm_problem.fftc (5.8 KiB)
rm_problem.txt (400 B)
rm_problem.ffrm (6.6 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

·
sreekanthreddy avatar image
sreekanthreddy answered sreekanthreddy posted

I didn't get what you are expecting.I have gone through your test case and response map,but it works fine.

 

Could you please explain detail on this.

 

 

5 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.

dclaar avatar image dclaar commented ·

You ran it? Doesn't work for me!

Test Report

File generated at: Thu Jul 08 14:28:20 PDT 2010
Test case: project://my_project/test_cases/rm_problem.fftc
Testbed:  
Parameters File:  
Owner:  
Test Case Id:  
Test Case Namespace:  
Test Case Name:  
Execution started: Thu Jul 08 14:28:07 PDT 2010
Execution completed: Thu Jul 08 14:28:07 PDT 2010
Execution duration: 00:00:00.1
Report Id: 5194
Host: LT-DCLAAR-WIN7
Group:  
SubGroup:  
Total report items: 2
Total issues: 5
  - Pass/OK: 1
  - Fail/Error: 2
  - Warning: 0
  - Information: 2
Status: Fail



Parameters

Session Parameter Name Description Value Source



Execution Issues

Index Severity Originator Message Location

info execution
Execution started

1
fail query
No matches found for query: lo_status_up()
/procedures/0/steps/0
1
pass analysis
Query "bvi0_status_up()" matched value "yes", which is equal to "yes"
/procedures/0/steps/0
1
fail execution
Test case rm_problem has failed.
/procedures/0/steps/0

info execution
Execution completed (0s)


Steps

Index Action Session Start Time Duration

call

00:00:00
00:00:00
Command: main
Issues:
info execution
Execution started

info execution
Execution completed (0s)

1
readFile

00:00:00
00:00:00
Command: rm_problem.txt
Issues:
fail query
No matches found for query: lo_status_up()
/procedures/0/steps/0
pass analysis
Query "bvi0_status_up()" matched value "yes", which is equal to "yes"
/procedures/0/steps/0
fail execution
Test case rm_problem has failed.
/procedures/0/steps/0
Response:
Interface bvi0 state
   Admin up:           yes
   Link up:            yes

Interface lan0 state
   Admin up:           yes
   Link up:            yes

Interface lo state
   Admin up:           yes
   Link up:            yes
   
Interface mgmt0 state
   Admin up:           yes
   Link up:            yes

Interface mgmt1 state
   Admin up:           yes
   Link up:            no
Post-Processing:
analyze
  query lo_status_up(): assert $value == "yes"
  event
OnNoMatchesFound
  action
DeclareExecutionIssue Error:No matches found for query: lo_status_up()
  action
FailTest
  event
OnTestResultChange
  event
OnFailTestAction
analyze
  query bvi0_status_up(): assert $value == "yes"
  assert
value: yes; assertion: true
  action
DeclareExecutionIssue OK:Query "bvi0_status_up()" matched value "yes", which is equal to "yes"
  action
PassTestIfNotAlreadyFailed
  event
OnPassIfNotAlreadyFailedAction
  event
OnFailedTestResult
  action
DeclareExecutionIssue Error:Test case rm_problem has failed.
0 Likes 0 ·
sreekanthreddy avatar image sreekanthreddy dclaar commented ·

I have executed the test case.please see the attached test report.

0 Likes 0 ·
rm_problem.html (12.4 KiB)
dclaar avatar image dclaar sreekanthreddy commented ·

Looks like it was on 4.0, too, from the report format. That's just completely weird!

0 Likes 0 ·
treddy avatar image treddy dclaar commented ·

I think I found the cause for the failure. There is a mistake in the query format of "lo_status_up". The query format has "interface_status_up('l0')" instead of interface_status_up('lo'), where "lo" is the interface name. let me know if it solves your query?

0 Likes 0 ·
dclaar avatar image dclaar treddy commented ·

Yes, you are right!

 

Thanks!

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.