Smart API and Correlation

jack_jigarjack_jigar Posts: 9
edited June 15 in SOAtest

Hi,

Smart API Test Generator can be correlate data between APIs?

For example "Test1" generate a "CSRF Token" that must be used in "Test2" .

Can Smart API automatically extract data (CSRF Token) and put it in a variable then use that variable in Test2?

BR.

Comments

  • OmarROmarR Posts: 205 admin

    Good morning jack_jigar,

    Yes! The Smart API test generator can correlate data between APIs. However, it is currently dependent on where the data is coming from.

    How is the csrf token being returned from Test 1? Does it return as a header or as part of the response payload?

    Also, how is Test 2 using the csrf token? Is it using it as part of its request header (likely) or as part of the payload? We would appreciate your feedback on this!

  • jack_jigarjack_jigar Posts: 9

    thank you for your response.

    "csrf token" in "Test1" and "Test2" is part of response/request payload. IT IS NOT USED IN HEADER.

  • OmarROmarR Posts: 205 admin

    One additional question, are both calls in JSON?
    If so, the Smart API test generator will handle this case seamlessly :)

  • jack_jigarjack_jigar Posts: 9
    edited June 15

    No, unfortunately both are Message Client tools. not XML and not JSON

  • jack_jigarjack_jigar Posts: 9

    Dear OmarR,

    I can't find any information about correlation in SMART API User Guide. it is very important for automation testing. also I can't find any information about automatically data source generation for input data.

  • OmarROmarR Posts: 205 admin

    To clarify, the tool will have no trouble handling your case if the content-type is JSON.

    As far as correlation, it would be somewhat of a difficult and complicated task to document. I highly recommend requesting a demo from our field team to see the tool in action!

  • jack_jigarjack_jigar Posts: 9

    Dear omarR,

    how can I use this feature If content type not be JSON?

    please assist me.

  • jakubiakjakubiak Posts: 332 ✭✭✭

    What content type are your payloads?

  • jack_jigarjack_jigar Posts: 9

    in the most time content type is "application/x-www-form-urlencoded".

  • jakubiakjakubiak Posts: 332 ✭✭✭

    The content type is form urlencoded for response payloads as well?

  • jack_jigarjack_jigar Posts: 9
    edited June 15

    please refer to below image. it is real sample.

  • jack_jigarjack_jigar Posts: 9

    Also, how can I use automatically data source generation benefit in Smart API?

  • Chris ColosimoChris Colosimo Posts: 69 admin

    Hi Jack, These are good questions. I would like to meet with you directly so we can hammer out the use case and post a neat solution here in the forum. Ill send you a direct message

  • jack_jigarjack_jigar Posts: 9

    Thank you.

Sign In or Register to comment.