Forum Discussion

Alick's avatar
Alick
Occasional Contributor
8 years ago
Solved

I can't work out how to run secure with proper JSON parameters

Hi all

 

I have the tests working fine with soapui (imported from API blueprint), when i try to run them through ReadyAPI secure, there are only 3 parameters being tested with the test values:

 

username

password

request

 

where "Request" seems to be how it recognises the json, so of course all my tests are failing because no actual json is being sent, just a parameter of request with the attack string which doesn't actually exist

 

I've tried the knowledgebase and clicking every option i can find in the UI, does anyone know how I can get it to properly extract the parameters in the json body to cycle through each one for testing?

 

edit: ok so i have to make a ne wplain type parameter. i'm calling it "email", but trying to reference it in the json as ${email} isn't working, but i think i'm getting closer...

 

edit2: that parameter works in the soapui tap but not projects or secure, how do i get secure to be able to insert its values into the json parameters? i think the answer is in the screenshot here: https://community.smartbear.com/t5/SoapUI-NG/Secure-injecting-data-to-a-parameter-in-a-REST-request/td-p/127585 but it's so low-resolution i can't make out how the parameter is referenced. Where is any of this documented? i can't find it anywhere in the docs

Thanks

  • Hello!

     

    Sorry for the late reply, I thought my fellow developer had already replied to this.

     

    Injecting values into JSON has been pretty excruciating in Ready! API Secure, but it's just become easier. In version 1.9 you will be able to extract the JSONPath for different values in a JSON Post automatically, just like we've extracted XPath in earlier versions.

     

    Try it out!

     

    Kind regards,

    Manne, Ready! API Developer

3 Replies

  • Hello!

     

    Sorry for the late reply, I thought my fellow developer had already replied to this.

     

    Injecting values into JSON has been pretty excruciating in Ready! API Secure, but it's just become easier. In version 1.9 you will be able to extract the JSONPath for different values in a JSON Post automatically, just like we've extracted XPath in earlier versions.

     

    Try it out!

     

    Kind regards,

    Manne, Ready! API Developer

    • Alick's avatar
      Alick
      Occasional Contributor

      Hi Mfagerlind, thanks for the reply :)

       

      yeah I was told after contacting smartbear directly that it was an issue from <1.9.0 which has been fixed in the latest release which is definitely what I wanted! I think it was ticket API-1341 if i remember correctly, I was checking everyday for an update and when 1.9.0 came out I was shamelessly happy :)