Open
Conversation
Created a foundational test setup to enable writing tests across the application. Added integration and unit tests for UserRestController and JwtAuthenticationRestController to validate their functionality and improve code coverage.
Added application-test.properties to allow for a separation of application and test properties using Spring profiles. Documented and refacted ApplicationConfiguration to check the Spring profiles - this should be done automatically by Spring but as we are using a property to define the location of the other property files (under QAT_HOME), it needs to be done manually. Also added the option to define QAT_HOME as an environment variable and tested that any property can be overriden with an environment variable (which will be used in the CI/CD pipeline).
- Create TestMySQLContainer as singleton for efficient test execution - Move SQL scripts to test resources for better organization - Set JaCoCo coverage minimum to 0% temporarily
- Move @SpringBootTest to AbstractIntegrationTest - Move @AutoConfigureMockMvc to AbstractIntegrationTest - Move @activeprofiles("test") to AbstractIntegrationTest - Update shouldReturnUserDetails to expect success result
Implemented Flyway for the DB management; the solution will need to change when Flyway is implemented for the whole application - e.g. the migrations should be added under src/main/resources so the scripts are only added to the source code once.
Moved the tests so that they match the package of the class they are testing. This means that we don't need to improve the classes that are being tested and makes life easier and simpler.
Finished the implementation for Flyway for the application itself. It is currently turned off (via the properties) but when it is enabled we can put our database scripts into the folder src/main/resources/db/migrate with a version prefix e.g. `V1__` and they will be automatically run in the application's database
Created a PR template to enforce best practises when developers and implementers open PRs in the code. They will be prompted to fill in details about their work and provide clear descriptions and details.
Created a CI pipeline using Github Actions to perform a build and test on every push to the repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds
To allow for tests to run, we had to make some other changes:
Type of change
Testing
Test Cases
QAT_HOMEFOLDERinstead of changing application.propertiesDeployment Instructions (optional)
To run all the tests:
To run a single test:
QA Instructions (optional)
To set your environment variable for QAT_HOMEFOLDER:
To remove the environment variable:
To test Flyway:
Breaking Changes
Dependencies
Added:
Related Tickets & Documents
Screenshots/Recordings
Checklist
Additional Notes
Documentation can be viewed here: