Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java - test REST API

Giuseppe LacagninaMay 6 2019 — edited Aug 23 2019

Dear All,

I have recently started to use Java in my work as Test Engineer (my previous experience is with C#). I need some guidance to find the best way to achieve my goal, which is to develop a JUnit-based testing solution to test a RESTful service.

Could you please point me to some resources to support me implement a simple solution? I essentially need to:

  • make HTTP requests for GET, POST, PUT, DELETE
  • retrieve the response as JSON
  • find stuff in the response for the tests

In the cases of the POST and PUT calls, I need to specify a JSON body. It is all conceptually easy but, being relatively new to Java, I am not sure how to do it (I would like to implement a nice architecture, for one thing).

I also do not know if there is some guide or some simple project already doing all these things I need.

Can anyone help? Thanks in advance!

Comments
Post Details
Added on May 6 2019
2 comments
555 views