Giter Club home page Giter Club logo

mongodb-crud-spring-security-karate-dsl's Introduction

Built this POC to learn MongoDB and Integration testing using Karate DSL


Technologies Used

  • Java
  • Spring-boot
  • Spring-security
  • MongoDB
  • Karate DSL
  • Open-API 3.0
  • Docker

Local Setup with Docker

  • Install Java 17 (recommended to use SdkMan)

sdk install java 17-open

  • Install Maven (recommended to use SdkMan)

sdk install maven

  • Run the below command in backend sub-folder

mvn clean install

  • Run the below 2 commands in the root directory to build and start the containers
sudo docker-compose build                  
sudo docker-compose up -d                  

Local Setup without Docker

  • Install Java 17 (recommended to use SdkMan)

sdk install java 17-open

  • Install Maven (recommended to use SdkMan)

sdk install maven

  • Install MongoDB on your system (Installation Guide) and create a database and document users, configure the appropraite value in .properties file
use eclair
db.createDocument('users')
  • Clone the repo and run the below command in the backend folder (remove dockerfile-maven-plugin from pom.xml if not installed)

mvn clean install

  • To start the application, run any of the below 2 commands

mvn spring-boot:run &

java -jar /target/mongodb-crud-spring-security-karate-dsl-1.0.0.RELEASE.jar &

  • Access the swagger-ui (port and context path can be modified in .properties file)

http://localhost:8080/swagger-ui.html

  • To run karate feature tests, go to the integration-tests-karate folder and run the below command

mvn test

api-base-url can be changed if required in karate-config.js

mongodb-crud-spring-security-karate-dsl's People

Contributors

hardiksinghbehl 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.