Giter Site home page Giter Site logo

anandbagmar / reactjs-reqres.in Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 906 KB

react.js sample working with reqres.in Api. E2E tests are implemented using Selenium-Java, Visual testing using Applitools (applitools.com) and Intelligent Service Virtualization using Qontract (qontract.run)

HTML 1.39% JavaScript 84.32% Java 14.28%
rest applitools qontract visualai api virtualization service-virtualization

reactjs-reqres.in's Introduction

react.js sample working with reqres.in Api

Features:

  • Sign up (using Api)
  • Log in (using Api)
  • Get users list (from Api) and save it to redux store
  • Edit a user (sending request to Api) and save changes to redux store
  • Add a new user (sending request to Api) and save changes to redux store
  • Delete a user (sending request to Api) and delete user from redux store

In the project directory, you can run:

npm i
npm start

Technologies:

  • react.js
  • react-redux
  • redux-saga
  • axios
  • styled-components
  • loadash

End-2-End (Functional) Tests

  • End-2-End (E2E) Functional Tests are implemented using Selenium-Java.
  • Visual validation is done using Applitools (https://applitools.com)
  • Intelligent stubbing is achieved using Specmatic (https://specmatic.in)

For the purpose of the demo, the /api/users?delay=2&page=1 GET endpoint is stubbed using Specmatic

Running the E2E tests

To run the tests, follow the below steps:

  • Signup for a free Applitools account from https://auth.applitools.com/users/register

  • Save the Applitools API as an environment variable with name - APPLITOOLS_API_KEY

    > export APPLITOOLS_API_KEY=..... (on Linux / Mac)
    

    or

    > set APPLITOOLS_API_KEY=..... (on Windows)
    
  • Download Specmatic from (https://github.com/znsio/specmatic/releases) to some directory

  • Start Specmatic in stub mode and give it the path to the Specmatic spec

    Example: If Specmatic jar is downloaded in directory ./temp

    java -jar ./temp/specmatic.jar stub ./src/e2eTest/resources/getUsers.qontract
    
  • Run the test

./gradlew clean test
  • Check Applitools dashboard (https://eyes.applitools.com) for visual test results
  • TestNG logs of executed tests are available in the reports directory

reactjs-reqres.in's People

Contributors

anandbagmar avatar mohsen1932 avatar

Watchers

 avatar

Forkers

jmk47912204

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.