Eclair | APPLICATION LINK
Built this POC to learn MongoDB and Integration testing using Karate DSL
- Java
- Spring-boot
- Spring-security
- MongoDB
- Karate DSL
- Open-API 3.0
- 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
- 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 frompom.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