Skip to content

Latest commit

 

History

History
executable file
·
47 lines (27 loc) · 1.42 KB

README.md

File metadata and controls

executable file
·
47 lines (27 loc) · 1.42 KB

Just a Job Assignment

How to start/stop external dependencies (MongoDB)
  • (For start) Execute the following: docker-compose up

  • (For stop) Execute the following: docker-compose down

How to run unit tests
  • Execute: mvn clean test
How to run integration tests (we need to start external dependencies - see above)
  • Execute: mvn clean verify
How to run unit and integration test coverage via JaCoCo
  • Execute: mvn clean package
  • Go to: target/site/jacoco/index.html
How to build docker image
  • First option is via command: mvn install with the help of com.spotify:dockerfile-maven-plugin

  • Second option is:

    • Execute: docker build -t job-chriniko/job-chriniko-assignment .
How to run service
  • First option is:

    • Execute: java -jar target/job-chriniko-assignment-1.0.jar
  • Second option is:

    • Execute: docker run job-chriniko/job-chriniko-assignment:latest
  • Third option is:

    • Execute: mvn spring-boot:run
How to manual test:
  • In order to see functionality hit the following url with GET operation

    • localhost:8080/job-assignment/text?p_start=1&p_end=10&w_count_min=1&w_count_max=20
  • In order to see history hiw the following url with GET operation

    • localhost:8080/job-assignment/history