Skip to content

This is a BDD demo application, written using JAVA, Cucumber and RestAssured for a google books Web Service.

Notifications You must be signed in to change notification settings

Iiqra/WebServiceTests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WebServiceTests

This is an example BDD test automation project, written using Cucumber-JVM framework and RestAssured for a google books Web Service.

Purpose

This project was developed by me to demonstrate how to use Cucumber-JVM as a BDD test framework.

Technology Stack

  • Java
  • Cucumber
  • RestAssured
  • JUnit
  • Maven

Prerequisites & Versions

Project Structure

Though the project structure for this sample demo application does not matter much, in large projects it plays an important role from the maintability, accessibility, and reusability standpoint. Therefore, I have devided the overall project code into two main sections; main and test. The main folder contains all the framework related code, whereas test folder contains purely the testcases related stuff - in this case, these are feture and step definition files, and Runner class which is for the glue code between these two entities. Likewise, you can navigate inside main folder to learn more about project structure.

About the Web Service

I have randonmly found this Google Books Web Service link which I'd recommend you to explore further using Postman.

Execute Tests

This project uses Maven. To run tests, simply run:

mvn clean test.

Test Reports

You can find the Surefire HTML reports in the following directory of the Project.

\target\surefire-reports\index.html

Practice Exercises & TODOS

To extend your understanding further with the underline tech-stack, try the following exercises:

Add new scenarios after exploring the response of this Web Service in Postman. For example,

  • Verify title and author fields for books volume
  • Verify the response time should be less than 1s

Add logging in this project using any logging library such as SLF4J whose references is also included in the Pom file. Explore Serenity and Surefire reporting (References are already included in the pom file).

About

This is a BDD demo application, written using JAVA, Cucumber and RestAssured for a google books Web Service.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published