This package contains common utilities used by the various projects that make up the NHS integration adaptors.
To use this package as part of your project, ensure you have pipenv installed and on your path, then from your
project's directory run:
pipenv install -e ./relative/path/to/package/directory
E.g:
pipenv install -e ./../common
pipenv run unittestswill run all unit tests.
pipenv run unittests-covwill run all unit tests, generating a Coverage report in thetest-reportsdirectory.pipenv run coverage-reportwill print the coverage report generated byunittests-covpipenv run coverage-report-xmlwill produce an XML version of the coverage report generated byunittests-cov, in a Cobertura compatible formatpipenv run coverage-report-htmlwill produce an HTML version of the coverage report generated byunittests-cov
To use sonarqube analysis you will need to have installed sonar-scanner.
Ensure sonar-scanner is on your path, and configured for the sonarqube host with appropriate token.
sonar-scanner will use sonar-project.properties to submit source to sonarqube for analysis.
(See: SonarQube)
NOTE: Coverage will not show in the analysis unless you have already generated the xml report (as per above.)
Three scripts are available from pipenv run, they are:
local-env-prepThis will prepare any docker images required to run a local-environment.local-env-startThis will run a local environment which can be used for local exploratory testing.local-env-stopThis will stop the local environment which was started, so that it is not running when not needed.