marcinogo / robot

2 stars 3 forks source link

= README

== ABOUT ROBOT PROJECT

image:https://jenkins-nasz-pan.pl/buildStatus/icon?job=test_pipeline_1%2Fmaster[Build Status] image:https://jenkins-nasz-pan.pl/sonar/api/project_badges/measure?project=edition.academy.seventh%3Arobot&metric=alert_status[Quality Gate Status]

Robot collects information about books on promotion and those available for free in various libraries. Some through their REST APIs, some through screen-scraping. Information is persisted in the database and there is a simple reporting module.

== PREREQUISITES

IMPORTANT: Before coding you have to (by using command line) go into a git-hooks directory, use a command chmod +x add-hooks and next run ./add-hooks to activate the git hooks. They will prevent git commits that not building project.

=== System requirements

=== Others

Clone this repository to your desired directory.

Prerequisites for running tests are described in <<anchor-1, RUNNING#Tests>> section. Prerequisites for running backend application are described in <<anchor-2, RUNNING#Application>> section.

== RUNNING

=== Tests

[[anchor-1]]To run integration or full scope of tests you need to:

==== Full scope of tests

Go into a main project's directory using command line and use mvn clean verify command to run unit, integration and performance tests.

==== Integration tests

Go into a main project's directory using command line and use mvn clean test-compile failsafe:integration-test command to only integration tests.

==== Performance test

Go into a main project's directory using command line and use mvn clean gatling:test command to run only performance test. Test is performed by open source tool Gatling. This test is part of integration tests scope by default.

==== Unit tests:

Go into a main project's directory using command line and use mvn clean test command to run only unit tests.

=== Application

==== Backend

[[anchor-2]]To run backend part of application you need to have unused port 8080. If it is not a case you have to uncomment line: 1 in application.properties. Then application will start at pot 8085.

To start application use in command line (main project directory):

==== Frontend

To run frontend part of application read this https://github.com/marcinogo/robot-front/blob/master/README.md[robot-front README].

== USAGE

=== Live version

Application is deployed with frontend part on https://bookrobot-front.herokuapp.com/home[*Heroku* server]. An unauthorized user can view information about books with the latest promotion from various bookstore, sort books, filter them by a bookstore and go to next/previous pages.

The user can also sign in or sign up to perform additional actions:

//// === Local version TODO: dodać informaje jak lokalnie tstować apkę, pod jakie endpointy uderzać ////