GithubHelp home page GithubHelp logo

aryaghan-mutum / webservicesautomation Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 6.82 MB

The purpose of the suite is to test the content in the REST services (JSON files) using Functional Programming in Java Streams and Lambda Expressions.

License: MIT License

Java 100.00%

webservicesautomation's Introduction

WebServicesAutomation Project

The purpose of the suite is to test the content in the REST services (JSON files) using Functional Programming in Java Streams and Lambda Expressions.

Useful Commands:

java -version

Tools

  • Java 8
  • Rest Assured
  • JUnit and TestNG
  • Gradle

Run Tests using gradle commands:

Command to run a particular class:
  • gradle test --tests TestClassName
Command to run all classes for particular package:
  • gradle test --tests com.microservice.regression.packageName* -- info
Command to run and write the test output into a test file:
  • gradle test --tests TestClassName --info > testFile.txt
Command to run tests with stacktrace:
  • gradle test --tests TestClassName --info --stacktrace
Execute all tests
  • ./gradlew test
Useful REST API Links
REST Assured
  • given() -> set cookies, add auth, add param, set headers info
  • when() -> get, post, put delete
  • then() -> validate status code, extract response, extract headers cookies and response body

Notes:

To be able to create tests cases to validate the content in the services, I created a JSON file from scratch. For example: movies.service.json. However, creating a huge payload takes time, so I have taken already existing JSON files to test from: samayo Thanks to him!

  • Used https://reqres.in/ to use dummy REST service Apis for testing
  • Create custom API: https://github.com/typicode/json-server or https://www.mockapi.io/ or https://my-json-server.typicode.com/

webservicesautomation's People

Contributors

aryaghan-mutum avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.