assertion xpath match
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007
11:19 AM
06-06-2007
11:19 AM
assertion xpath match
Hello,
Some time it necessary to put an assertion on a value in the response and compare it to some value in either some other response or request. The current assertion wizard is great but it would be helpful if in the 'expected Result' you can specify a XPath and pick any step and value from the testcase.
hopefully my request made sense.
Also, do you have a rough estimate as to when 1.8 is coming out ?
Thanks
Ali
Some time it necessary to put an assertion on a value in the response and compare it to some value in either some other response or request. The current assertion wizard is great but it would be helpful if in the 'expected Result' you can specify a XPath and pick any step and value from the testcase.
hopefully my request made sense.
Also, do you have a rough estimate as to when 1.8 is coming out ?
Thanks
Ali
7 REPLIES 7
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007
11:24 AM
06-06-2007
11:24 AM
Hi Ali,
thanks for this idea, it hasen't even occured to me :-).. since you can use property-expansion in the expected content field, you could manually enter something like ${AnotherRequest#Response#...xpath-expression...}, but a wizard would obviously make it easier.. thanks!
We are planning to release 1.7.2 in 1-2 weeks, the main focus of the release is project/test-management, improved usability (drag-and-drop, etc..), stability and a number of bug-fixes..
regards,
/Ole
eviware.com
thanks for this idea, it hasen't even occured to me :-).. since you can use property-expansion in the expected content field, you could manually enter something like ${AnotherRequest#Response#...xpath-expression...}, but a wizard would obviously make it easier.. thanks!
We are planning to release 1.7.2 in 1-2 weeks, the main focus of the release is project/test-management, improved usability (drag-and-drop, etc..), stability and a number of bug-fixes..
regards,
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007
02:18 PM
06-06-2007
02:18 PM
Hello Ole,
The wizard will be really helpful. In the mean time I tried the properties expansion but I think I am doing something wrong. can you please help.
In my expected window in the assertion, i have ->
declare namespace lis='http://services.tvguide.com/v2/ListingPreferenceService';
${CreateCustomGrid#Request#//lis:CreateCustomGrid/lis:request/lis:CustomGrid/lis:Name/text()}
I get the following error when I test the assertion;
...comparisonFailure:expected but was
seems like the xpath is not getting translated property to 'CustomGridName12' which is the value in the request.
The wizard will be really helpful. In the mean time I tried the properties expansion but I think I am doing something wrong. can you please help.
In my expected window in the assertion, i have ->
declare namespace lis='http://services.tvguide.com/v2/ListingPreferenceService';
${CreateCustomGrid#Request#//lis:CreateCustomGrid/lis:request/lis:CustomGrid/lis:Name/text()}
I get the following error when I test the assertion;
...comparisonFailure:expected
seems like the xpath is not getting translated property to 'CustomGridName12' which is the value in the request.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007
02:55 PM
06-06-2007
02:55 PM
Hi Ali,
thanks.. I'll check into this.. can you post the entire request you are expanding from? (or mail to ole@eviware.com)?
A side-note; you can't declare namespaces when using property-expansion, the prefixes in the actual request will be used..
regards,
/Ole
eviware.com
thanks.. I'll check into this.. can you post the entire request you are expanding from? (or mail to ole@eviware.com)?
A side-note; you can't declare namespaces when using property-expansion, the prefixes in the actual request will be used..
regards,
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007
03:03 PM
06-06-2007
03:03 PM
Request: I want to use the 'name' value from this request to be used in my 'expected window'
a345b9a3-213e-40d0-89b2-eb5fba585df0
CustomGridName12
false
696
700
873
3
2007-05-26T23:10:53-08:00
3
false
false
2007-05-26T23:10:53-08:00
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2007
04:18 AM
06-07-2007
04:18 AM
Hi,
thanks.. it should work ok if you specify
${Request Step#Request#//lis:Name/text()}
Unfortunately there is a bug in the XPath Assertion editor window so it will not work there with the "Test" button, but should work when either resubmitting the containing test-request or running the containing TestCase..
let me know!
regards,
/Ole
eviware.com
thanks.. it should work ok if you specify
${Request Step#Request#//lis:Name/text()}
Unfortunately there is a bug in the XPath Assertion editor window so it will not work there with the "Test" button, but should work when either resubmitting the containing test-request or running the containing TestCase..
let me know!
regards,
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2007
11:23 AM
06-07-2007
11:23 AM
Ole,
You are right, it does not work with 'Test' but when I run the test case, it works fine. One good feature would be to figure out the 'Xpath' of any element. It would be nice if you could right click on some element and click on 'view Xpath'. This way its much easier to compute XPath
You are right, it does not work with 'Test' but when I run the test case, it works fine. One good feature would be to figure out the 'Xpath' of any element. It would be nice if you could right click on some element and click on 'view Xpath'. This way its much easier to compute XPath
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2007
11:45 AM
06-07-2007
11:45 AM
Hi,
if you put the caret on the desired element or select it in the outline view, and the select the XML Inspector from the inspector tabs at the bottom, you will see the xpath expression for the current node there..
see http://www.soapui.org/userguide/message ... _Inspector for a screenshot..
regards!
/Ole
eviware.com
if you put the caret on the desired element or select it in the outline view, and the select the XML Inspector from the inspector tabs at the bottom, you will see the xpath expression for the current node there..
see http://www.soapui.org/userguide/message ... _Inspector for a screenshot..
regards!
/Ole
eviware.com
