Skip to content

chriniko13/job-assignment-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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