QSTP Environments is a microservice. It is designed to configure and store information about project environments and to provide this information to other services during test scenarios execution.
For local DB in Docker deployment, see the following instructions - DB in Docker
This project uses Lombok. This means that the project has a code that is generated before compilation. To develop you need to install a plugin for your IDE.
Probably you would need running Hazelcast instance. You can find information like "How to run Hazelcast locally"
- In some cases with flag
-DskipTests - If you have not compiled q-classes:
- check
db-postgresql,migration-on-build-pgin profiles; - set settings for DB -
jdbc.url,jdbc.user,jdbc.passwordinparent-db-properties(like in the step bellow) - and create extensions in db if not
- check
- Check and enable maven profiles
db-postgresqlandmigration-on-build-pg
- Main class: org.qubership.atp.environments.Main
- VM options:
-Djavax.net.ssl.keyStore=src/main/config/keystore.p12
-Djavax.net.ssl.keyStorePassword=123456
-Dspring.datasource.url=jdbc:postgresql://localhost:5432/dev_env?preferQueryMode=simple
-Dspring.datasource.username=dev_env_user
-Dspring.datasource.password=dev_env_pass
-Dlogback.configurationFile=src/main/config/logback.xml
-Dlog.graylog.on=false- Working dir (for example): C:\Projects\env-backend
- VM options for logging define where is logback file and where log should be (console.log or graylog):
-Dlogback.configurationFile=src/main/config/logback.xml
-Dlog.graylog.on=falseJust run Main#main with args from step above
Please follow common PostgreSQL instructions to do so, using pg_dump and pg_restore/psql command-line utilities bundled in PostgreSQL.
Example for dev04 openshift server connection. For another project use correspond server and credentials.
- Go to [ATP Cloud]
- Find paragraph dev-atp-cloud > Base coordinates
- Find service Postgres in table with Base coordinates
- Copy External address with port, for example 127.0.0.1:98765
- Go to development environment with Environment service opened
- Go to src/test/config/application-test-rest-api.properties
- Set parameters:
spring.datasource.url=${pg.jdbc.Url:jdbc:postgresql://127.0.0.1:98765/dev_env}
spring.datasource.username=${pg.jdbc.User:dev_env_user}
spring.datasource.password=${pg.jdbc.Password:dev_env_pass}- Go to parent/parent-db-properties/pom.xml
- Set parameters:
<pg.jdbc.Url>jdbc:postgresql://127.0.0.1:98765/dev_env?preferQueryMode=simple</pg.jdbc.Url>
<pg.jdbc.User>dev_env_user</pg.jdbc.User>
<pg.jdbc.Password>dev_env_pass</pg.jdbc.Password>- Go to Maven, select lifecycle phases and click Run Maven Build