Skip to content

SkillsFundingAgency/das-provide-feedback-employer

Repository files navigation

Employer Feedback

UK Government logo

Build Status Quality Gate Status Jira Project Confluence Project License

This repository represents the code base for the employer feedback service. This is a service that allows employers to provide feedback on their training providers. Employers can give feedback via the ad hoc journey from their employer account. The employer has previously been able to provide feedback via emails, as they would recieve emails prompting them to give feedback. However, this emailing function is in the process of being decommissioned.

Developer Setup

Requirements

Environment Setup

  • Database - Publish the local database from the ESFA.DAS.EmployerFeedbackEmail.Database project.
  • local.settings.json file - Add the following to the local.settings.json file in the ESFA.DAS.ProviderFeedback.Employer.Functions.Emailer functions app.

Please note all the connection string and secrets to API have been removed. This will need updating.

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "ASPNETCORE_ENVIRONMENT": "DEV",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "FUNCTIONS_EXTENSION_VERSION": "2.0.12673.0",
    "AppInsights_InstrumentationKey": "",
    "FeedbackSiteBaseUrl": "localhost:5030",
    "AppName": "das-provide-feedback-emailer",
    "LogDir": "C:\\Logs\\ESFA\\Provide Feedback\\Employer"
  },
  "ConnectionStrings": {
    "EmployerEmailStoreConnection": "Data Source=(localdb)\\ProjectsV13;Initial Catalog=ESFA.DAS.EmployerFeedbackEmail.Database;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultipleActiveResultSets=true;MultiSubnetFailover=False",
    "Redis": "localhost:6379"
  },
  "CommitmentV2Api": {
    "ApiBaseUrl": "https://******.apprenticeships.education.gov.uk/",
    "IdentifierUri": "https://******.onmicrosoft.com/******"
  }
}

Running

  • Start Azurite e.g. using a command C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
  • Run the solution
  • NB: You will need das-commitments running too, specifically the SFA.DAS.CommitmentsV2.Api project.
  • To start the ad hoc journey: localhost:{port number}/{encoded account ID}/providers (to get the encoded account ID, run the account ID through the encoding service in the solution.)
  • Or to start the emailing journey: localhost:{port number}/{unique survey code}

Tests

This codebase includes unit tests and integration tests. These are each in a seperate project kept in a folder called Testing.

Unit Tests

The unit tests covering each project are each kept in a folder within the UnitTests project in the Testing folder. They are built using C#, Moq, FluentAssertions, .NET, MSTest, and XUnit.

Integration Tests

There is one integration test project, IntegrationTests, and in it one test class.

Application logs

Application logs are logged to Elasticsearch and can be viewed using Kibana at http://localhost:5601

License

Licensed under the MIT license