Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Validate request against response by assertion gets wrong value for a field of the request

Moin,

 

at first, I couln'd choose my version at the mandatory version labels.

  • Service: API Tester 
  • Version: 25.2.0

I want to validate a field of the response against the corresponding field of the request. The value in this field is mirrored by the server.

The webcall itself is fine and all values are as expected. The validation by assertion of the specific field is also ok if I compare the reponse's field against itself.

But if I try to validate the response against the request, I get a wrong value for the request's specific field.

 

Let me try to give an example.

What I want to do:

if $requestField1 == $responseField1 > OK

if $requestField1 != $responseField1 > NOT OK

 

Simple thing.

In this webcall's field Talend API Tester sends e.g. "uuid1" and the server responds correctly with "uuid1".

 

But the assertion-component show an expected value like "uuid2" which isn't used anywhere in the webcall. The wrong value is used to compare and i get a NOT OK-result (displayed by the red equals).

If I compare the response's field with the response, everything is fine, but this test is useless (displayed by the green equals).

 

0683p000009MZl1.png

 

How I access the values:

$.fieldname should compared to ${"project"."scenario"."webcall1"."request"."body"."fieldname"} - last variable shows wrong value which is not used in the webcall "0476..." vs "12cf..."

 

The same assertion with the response shows the correct value on both sides:

$.fieldname should compared to ${"project"."scenario"."webcall1"."response"."body"."fieldname"} - "0476..." vs "0476..."

 

My question is, why there is a difference in the stored request's body to the body which is used in the real webcall respectively how I should access the request's data correctly.

 

Best regards and thanks in advance,

Karsten

 

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hey there,

 

another useful information may be, that the same data-access show two different results.

The following two red equals reading from ${"project"."scenario"."webcall1"."request"."body"."fieldname"}.

 

0683p000009MZug.png

 

 

Any advice? Or how to post a bug-ticket?

 

Best regards and thanks in advance,

Karsten