cancel
Showing results for 
Search instead for 
Did you mean: 

Is it advisable to use JavaScript ?

SOLVED
Highlighted
Frequent Visitor

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: How to get a json post request body from REST test step into JavaScript test step

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
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

1 REPLY 1
Highlighted
Community Hero

Re: How to get a json post request body from REST test step into JavaScript test step

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
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors