Forum Discussion

Revanth_Kumar's avatar
Revanth_Kumar
Frequent Visitor
5 years ago
Solved

Is it advisable to use JavaScript ?

Hi all,

My question is "How to get a json post request body from REST test step into JavaScript test step"

I'm using licensed SOAP UI pro in Ready api, I want to test a json web service using JavaScript.

But I couldn't find any code for it. I want to get the request body from a REST request test step and then hit that request to URL and assert the results. I configured database using DATASOURCE test step. My URL's both input and output are in json format. I'm able to perform all this using Groovy Script but I'm new to JavaScript, please help me.

Thanks in advance.

  • Hi Revanth_Kumar,

    I'm afraid i cant help with the JavaScript, but im curious. Whats the need for using JavaScript over groovy?

    In fact, from your description it sounds like the embedded functionality supports what you need (so you wouldnt even need any scripting), so i'm intrigued!!

    why bother with JavaScript over the more popular/easier to use options?

    Cheers,

    Rich

1 Reply

  • richie's avatar
    richie
    Community Hero
    Hi Revanth_Kumar,

    I'm afraid i cant help with the JavaScript, but im curious. Whats the need for using JavaScript over groovy?

    In fact, from your description it sounds like the embedded functionality supports what you need (so you wouldnt even need any scripting), so i'm intrigued!!

    why bother with JavaScript over the more popular/easier to use options?

    Cheers,

    Rich