API Testing with BDD - frameworks

We are using Cucumber in Java with Maven. I am looking to build the framework for Rest Api's with BDD. Can you please help me and share any existing framework for API testing

Why don't you take a look at Ginkgo4j. This is a Java BDD framework based on Ruby's RSpec. Can be combined with library's like RestAssured to test REST APIs.

Related

How call Rest API in Eclipse RCP application?

I have one Eclipse RCP3 project.Now I need to call a rest api|(java) and Post some information using that API. Need Help.
Being a Java application, an Eclipse RCP app can use most existing Java REST client libraries. My opinion is that the easiest way is to use the ECF JAX-RS Jersey Client. I recently wrote an article about how to incorporate this into an Eclipse RCP application:
https://www.modumind.com/2020/05/19/eclipse-rcp-and-rest-an-introduction/
In short, the JAX-RS Jersey Client is an OSGi Remote Services client created as part of the Eclipse Communications Framework (ECF) project. It embeds a Jersey/Jackson JAX-RS implementation that allows you to create REST clients as annotated interfaces that are made available as OSGi services locally. Jackson is used to data bind the REST responses to Java POJOs which require little or no annotation.
This solution allows you to skip most of the scaffolding code that usually has to be written to make REST calls in a Java application. But of course, you can also use Jersey and Jackson directly, those plugins are made available via Eclipse Orbit project.
http://www.eclipse.org/orbit
The GitHub repository for the ECF JAX-RS Jersey Client can be found here:
https://github.com/ECF/JaxRSProviders

Generating REST API doc using swagger 0.9.1 for Spring MVC project

For my project,I want to generate REST API doc using swagger.I found one example app here
But this example is using 0.5.2 version of swagger-springmvc.
This version is not compatible with my Spring project.
could someone please guide me about how to integrate swagger 0.9.1 in spring MVC?
Note : Mine is not a spring boot app.
Adrian, one of the contributors to swagger-springmvc, has a repository with sample projects.
You can find the repository here - https://github.com/adrianbk/swagger-springmvc-demo.
By the way, the link to that is available at the main README of the swagger-springmvc project.

Can SoapUI generate .wadl for REST projects? If yes, how?

I am currently working on REST project using the SoapUI v5.0.0 Tool. The intention is to make the project's WADL (web application description languag) available on web. I would like to know if Soap UI provides facilities to generate .wadl for the REST projects.
Right-click on the endpoint, and select "Export WADL".

can anyone tell me how to create RESTful web services in spring with annotations

I am new to spring RESTful web services. can anyone tell me how to create RESTful web services in spring with annotations and what all jars to be included in the project? also how do i test it whether my web service is working fine. do we have a small demo example which serves the same purpose.
http://www.mkyong.com/spring-mvc/spring-3-rest-hello-world-example/ is a very good and useful tutorial. It goes through how to set up the Spring MVC project from scratch using Maven as your build tool and then it goes through a Spring MVC controller that uses the URL to perform REStful Web Services. Although it may seem small, the tutorial is very useful in getting you started and provides you with a platform to carry out more complex tasks. The following reference may be useful as a reference. http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch18s02.html

How to integrate GWT or Vaadin with Play Framework 2.0

Is is possible to implement the client side of a Play Framework 2.x web application using GWT or Vaadin?
Play 1.x has a special module that provides GWT integration, but I can not find examples of the use of these technologies together in Play 2.x version. Can these technologies be integrated? Is there a module, or must some other approach be used?
GWT and Play2 can work together seamlessly, just as GWT can be used with python and go backends.
Using GWT with Play2 has two parts, serving static files and client-server communication.
For the GWT produced static files (js, css, img..) you can just add them to the Play2 public directory, and they will be accessible based on the routes configuration.
For client-server communication your best bet is using a pure json-rest approach, as request-factory, gwt-rpc have some dependency on J2EE servlets.
There are plenty examples of providing a json/REST api with Play2, and plenty examples of interacting with json/REST APIs with GWT.
Henri Kerola demoed this recently for play 2.x and will give a talk at javaone this year:
http://www.youtube.com/watch?v=IwuqAh0VSek
I found a project on github which integrates Vaadin with Play 2.2:
https://github.com/henrikerola/play-vaadin-integration
You can't use Vaadin with play2. Vaadin is basically a Java EE servlet that must live in a Java EE container such as Tomcat.
Play is not based on Java EE, it uses its own server.
As for GWT all server side code needs a Java EE container. But if you just want the client side then it's totally possible as it is with any web framework.
Just create json web services and remove server dependancies.
For an example in php : http://gwtquickstart.blogspot.fr/2009/11/call-php-script-from-gwt.html