This component will listen for messages regarding work order updating and completion and persist them to the relevant store - BonusCalc DB in the first instance
- .NET Core as a web framework.
- NUnit as a test framework.
To serve the application, run it using your IDE of choice, we use Visual Studio CE and JetBrains Rider on Mac.
Note When running locally the appropriate database conneciton details are still needed.
We use a pull request workflow, where changes are made on a branch and approved by one or more other maintainers before the developer can merge into master
branch.
Then we have an automated six step deployment process, which runs in CircleCI.
- Automated tests (NUnit) are run to ensure the release is of good quality.
- The application is deployed to development automatically, where we check our latest changes work well.
- We manually confirm a staging deployment in the CircleCI workflow once we're happy with our changes in development.
- The application is deployed to staging.
- We manually confirm a production deployment in the CircleCI workflow once we're happy with our changes in staging.
- The application is deployed to production.
Our staging and production environments are hosted by AWS. We would deploy to production per each feature/config merged into release
branch.
To help with making changes to code easier to understand when being reviewed, we've added a PR template.
When a new PR is created on a repo that uses this API template, the PR template will automatically fill in the Open a pull request
description textbox.
The PR author can edit and change the PR description using the template as a guide.
Using FxCop Analysers
FxCop runs code analysis when the Solution is built.
Both the API and Test projects have been set up to treat all warnings from the code analysis as errors and therefore, fail the build.
However, we can select which errors to suppress by setting the severity of the responsible rule to none, e.g dotnet_analyzer_diagnostic.<Category-or-RuleId>.severity = none
, within the .editorconfig
file.
Documentation on how to do this can be found here.
$ make test
- Use NUnit, FluentAssertions and Moq
- Always follow a TDD approach
- Tests should be independent of each other
- Gateway tests should interact with a real test instance of the database
- Test coverage should never go down. (See the test project readme for how to run a coverage check.)
- All use cases should be covered by E2E tests
- Optimise when test run speed starts to hinder development
- Unit tests and E2E tests should run in CI
- Test database schemas should match up with production database schema
- Have integration tests which test from the DynamoDb database to API Gateway
- Record failure logs
- Automated
- Reliable
- As close to real time as possible
- Observable monitoring in place
- Should not affect any existing databases
- Dave Dean, Lead Developer at London Borough of Hackney (david.dean@hackney.gov.uk)
- Rashmi Shetty, Product Owner at London Borough of Hackney (rashmi.shetty@hackney.gov.uk)