Skip to content

Feat/e2e tests - #288

Open
CathLass wants to merge 14 commits into
mainfrom
feat/E2ETests
Open

Feat/e2e tests#288
CathLass wants to merge 14 commits into
mainfrom
feat/E2ETests

Conversation

@CathLass

@CathLass CathLass commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

Description

End to end tests using Playwright.
Runs a deployed Web app and database and tests that the page content (data fields) are as expected.
The expected data values are set in the tests as parameterised 'theory' tests.

There's a separate yml job to run these tests that can be called easily from wherever we need in the deployment pipeline - currently only being called for deployed review apps.

Not many tests written, but I think this infrastructure could go in - see how it goes and then maybe modify to run on the Test environment.

to run locally:
in VS menu: Tests->Configure run settings-> select the playwright.runsettings file from the solution root folder
from the cmdline run web app: dotnet run --project SAPPub.Web --no-build

either from the cmdline run tests: dotnet test Tests/SAPPub.Integration.Tests --no-build
or (my preferred - run them in test explorer)

@CathLass CathLass added the deploy A Review App will be created for PRs with this label label Aug 12, 2026
@github-actions

Copy link
Copy Markdown

Deployments

Review app is available at these URLs:
https://sap-public-pr-288.test.teacherservices.cloud

@CathLass
CathLass marked this pull request as ready for review August 13, 2026 17:46
@github-actions

Copy link
Copy Markdown

Summary

Summary
Generated on: 08/13/2026 - 17:50:17
Parser: Cobertura
Assemblies: 4
Classes: 168
Files: 165
Line coverage: 80.8% (3559 of 4403)
Covered lines: 3559
Uncovered lines: 844
Coverable lines: 4403
Total lines: 11161
Branch coverage: 69.2% (450 of 650)
Covered branches: 450
Total branches: 650
Method coverage: Feature is only available for sponsors

Coverage

SAPData - 75.6%
Name Line Branch
SAPData 75.6% 63.4%
SAPData.Filters.SqlViewFilterProvider 100% 100%
SAPData.GenerateIndexes 100% 100%
SAPData.GenerateRawTables 58.6% 39%
SAPData.GenerateViews 81.4% 75.9%
SAPData.KeyStageConstants 100%
SAPData.Models.DataMapMapping 0%
SAPPub.Core - 86.6%
Name Line Branch
SAPPub.Core 86.6% 86.8%
SAPPub.Core.ApplicationServices.EntityPropertyService 0% 0%
SAPPub.Core.Attributes.DbColumnNameAttribute 0%
SAPPub.Core.Enums.Progress8BandingExtensions 100% 100%
SAPPub.Core.Exceptions.NotFoundException 100%
SAPPub.Core.Extensions.DoubleExtensions 100%
SAPPub.Core.Extensions.EducationPhaseFormatter 100% 100%
SAPPub.Core.Extensions.EstablishmentExtensions 100%
SAPPub.Core.Extensions.EstablishmentStatusExtensions 94.7% 100%
SAPPub.Core.Extensions.SchoolSearchDocumentExtensions 100%
SAPPub.Core.Extensions.StringExtensions 100% 100%
SAPPub.Core.Helpers.AcademicYearsHelper 100%
SAPPub.Core.Helpers.MappingHelper 88.8% 100%
SAPPub.Core.Helpers.TextHelpers 86.6% 100%
SAPPub.Core.ServiceModels.Common.Pager 75%
SAPPub.Core.ServiceModels.EstablishmentServiceModel 100%
SAPPub.Core.ServiceModels.KS4.Performance.AdditionalMeasuresModel 100%
SAPPub.Core.ServiceModels.Search.InputModels.SearchQuery 100%
SAPPub.Core.Services.DestinationsService 100%
SAPPub.Core.Services.EmailService 100% 100%
SAPPub.Core.Services.EstablishmentService 100%
SAPPub.Core.Services.Gateway.GatewayLocalAuthorityService 0%
SAPPub.Core.Services.Gateway.GatewaySettingsService 0%
SAPPub.Core.Services.Gateway.GatewayUserAuditService 0%
SAPPub.Core.Services.Gateway.GatewayUserLAService 0%
SAPPub.Core.Services.Gateway.GatewayUserService 0%
SAPPub.Core.Services.KS4.Absence.EnglandAbsenceService 100%
SAPPub.Core.Services.KS4.Absence.EstablishmentAbsenceService 100%
SAPPub.Core.Services.KS4.Absence.LAAbsenceService 100%
SAPPub.Core.Services.KS4.Attendance.AttendanceService 100% 100%
SAPPub.Core.Services.KS4.Performance.EnglandPerformanceService 100%
SAPPub.Core.Services.KS4.Performance.EnglishAndMathsResultsService 100%
SAPPub.Core.Services.KS4.Performance.EstablishmentPerformanceService 100%
SAPPub.Core.Services.KS4.Performance.LAPerformanceService 100%
SAPPub.Core.Services.MySchoolsListService 95.2% 100%
SAPPub.Core.Services.Performance.KS2MeetingOrExceedingStandardsService 100%
SAPPub.Core.Services.Performance.KS2ScaledScoresService 100%
SAPPub.Core.Services.Performance.KS4EstablishmentSubjectEntriesService 100% 100%
SAPPub.Core.Services.Performance.KS5EstablishmentSubjectEntriesService 100%
SAPPub.Core.Services.Performance.Level2QualificationsService 85.1%
SAPPub.Core.Services.Performance.Level3QualificationsService 100%
SAPPub.Core.Services.Search.FeatureFlagSearchVisibilityPolicy 0%
SAPPub.Core.Specifications.SearchVisibilitySpecification 100% 100%
SAPPub.Core.ValueObjects.CodedDouble 100%
SAPPub.Core.ValueObjects.CodedString 100%
SAPPub.Infrastructure - 55.5%
Name Line Branch
SAPPub.Infrastructure 55.5% 22.9%
SAPPub.Infrastructure.Mapping.ValueCodes.CodedDoubleTypeHandler 9% 0%
SAPPub.Infrastructure.Mapping.ValueCodes.CodedStringTypeHandler 10% 0%
SAPPub.Infrastructure.Mapping.ValueCodes.ReasonCodeLookup 50%
SAPPub.Infrastructure.Mapping.ValueCodes.ReflectionCodedValueMapper 0% 0%
SAPPub.Infrastructure.Mapping.ValueCodes.ValueCodeParser 0% 0%
SAPPub.Infrastructure.PostcodeLookup.PostcodeLookupService 100%
SAPPub.Infrastructure.PostgresSearch.PostgresSchoolSearchIndexReader 100%
SAPPub.Infrastructure.Repositories.Destinations.KS4DestinationsRepository 0%
SAPPub.Infrastructure.Repositories.EmailRepository 94.1%
SAPPub.Infrastructure.Repositories.EstablishmentRepository 100% 100%
SAPPub.Infrastructure.Repositories.Gateway.GatewayLocalAuthorityRepository 100% 100%
SAPPub.Infrastructure.Repositories.Gateway.GatewayUserAuditRepository 100%
SAPPub.Infrastructure.Repositories.Gateway.GatewayUserRepository 100%
SAPPub.Infrastructure.Repositories.Generic.DapperCommandBuilder 0% 0%
SAPPub.Infrastructure.Repositories.Generic.DapperRepository`1 90% 100%
SAPPub.Infrastructure.Repositories.Generic.JSONRepository`1 0% 0%
SAPPub.Infrastructure.Repositories.Helpers.DapperHelpers 60.2% 0%
SAPPub.Infrastructure.Repositories.KS4.Absence.EnglandAbsenceRepository 100%
SAPPub.Infrastructure.Repositories.KS4.Absence.EstablishmentAbsenceReposito
ry
100%
SAPPub.Infrastructure.Repositories.KS4.Absence.LAAbsenceRepository 100%
SAPPub.Infrastructure.Repositories.KS4.Performance.EnglandPerformanceReposi
tory
100%
SAPPub.Infrastructure.Repositories.KS4.Performance.EstablishmentPerformance
Repository
100%
SAPPub.Infrastructure.Repositories.KS4.Performance.LAPerformanceRepository 100%
SAPPub.Infrastructure.Repositories.LaUrlsRepository 100%
SAPPub.Infrastructure.Repositories.Performance.KS2PerformanceRepository 100%
SAPPub.Infrastructure.Repositories.Performance.KS4EstablishmentSubjectEntri
esRepository
100%
SAPPub.Infrastructure.Repositories.Performance.KS5EstablishmentSubjectEntri
esRepository
100%
SAPPub.Infrastructure.Repositories.Performance.KS5PerformanceRepository 100%
SAPPub.Web - 89.1%
Name Line Branch
SAPPub.Web 89.1% 85.1%
SAPPub.Web.Areas.Compare.Controllers.SecondaryController 100%
SAPPub.Web.Areas.Compare.Filters.SecondaryComparisonQueryValidationAttribut
e
0%
SAPPub.Web.Areas.Compare.ViewModels.Secondary.CompareAboutYourSchoolsViewMo
del
100%
SAPPub.Web.Areas.Compare.ViewModels.Secondary.CompareAcademicPerformanceEng
lishAndMathsResultsViewModel
100%
SAPPub.Web.Areas.Compare.ViewModels.Secondary.CompareAcademicPerformancePup
ilAttainmentViewModel
100% 100%
SAPPub.Web.Areas.Compare.ViewModels.Secondary.CompareDestinationsViewModel 100% 100%
SAPPub.Web.Areas.Compare.ViewModels.Secondary.CompareNextStepsViewModel 100%
SAPPub.Web.Areas.Compare.ViewModels.Secondary.CompareSecondarySchoolBaseVie
wModel
100%
SAPPub.Web.Areas.Compare.ViewModels.Secondary.SchoolAttainmentDetailsViewMo
del
100% 100%
SAPPub.Web.Areas.Gateway.Controllers.GatewayController 53% 50%
SAPPub.Web.Areas.Profiles.Controllers.AboutController 100%
SAPPub.Web.Areas.Profiles.Controllers.AdmissionsController 100%
SAPPub.Web.Areas.Profiles.Controllers.CurriculumController 100%
SAPPub.Web.Areas.Profiles.Controllers.DestinationsController 100%
SAPPub.Web.Areas.Profiles.Controllers.KS4Controller 100%
SAPPub.Web.Areas.Profiles.Controllers.KS5Controller 52.6%
SAPPub.Web.Areas.Profiles.Filters.DfEAnalyticsAddPhaseTagFilter 0%
SAPPub.Web.Areas.Profiles.Filters.PrimaryQueryValidationFilter 0%
SAPPub.Web.Areas.Profiles.Helpers.AcademicYearSelectionExtensions 94.4% 100%
SAPPub.Web.Areas.Profiles.Helpers.GcseGradeSelectionExtensions 64.2% 50%
SAPPub.Web.Areas.Profiles.ViewModels.AboutSchool.AboutSchoolViewModel 100% 100%
SAPPub.Web.Areas.Profiles.ViewModels.Admissions.AdmissionsViewModel 100% 100%
SAPPub.Web.Areas.Profiles.ViewModels.Attendance.AttendanceViewModel 100%
SAPPub.Web.Areas.Profiles.ViewModels.Destinations.KS4DestinationsViewModel 100%
SAPPub.Web.Areas.Profiles.ViewModels.Destinations.KS5DestinationsViewModel 100%
SAPPub.Web.Areas.Profiles.ViewModels.KS2.AcademicPerformanceAdditionalMeasu
resViewModel
100%
SAPPub.Web.Areas.Profiles.ViewModels.KS2.AcademicPerformanceMeetingOrExceed
ingStandardsViewModel
100%
SAPPub.Web.Areas.Profiles.ViewModels.KS2.AcademicPerformancePupilProgressVi
ewModel
100%
SAPPub.Web.Areas.Profiles.ViewModels.KS2.AcademicPerformanceSubjectScaledSc
oresViewModel
100%
SAPPub.Web.Areas.Profiles.ViewModels.KS2.CurriculumAndExtraCurricularActivi
tiesViewModel
100%
SAPPub.Web.Areas.Profiles.ViewModels.KS4.AcademicPerformanceSubjectsEntered
ViewModel
100%
SAPPub.Web.Areas.Profiles.ViewModels.KS4.CurriculumAndExtraCurricularActivi
tiesViewModel
100% 100%
SAPPub.Web.Areas.Profiles.ViewModels.KS5.AverageResultViewModel 100%
SAPPub.Web.Areas.Profiles.ViewModels.KS5.EnglishMathsQualificationsViewMode
l
100%
SAPPub.Web.Areas.Profiles.ViewModels.KS5.EnglishMathsScoreViewModel 100%
SAPPub.Web.Areas.Profiles.ViewModels.KS5.Ks5SubjectEnteredViewModel 100%
SAPPub.Web.Areas.Profiles.ViewModels.KS5.KS5ViewModel 0%
SAPPub.Web.Areas.Profiles.ViewModels.KS5.Level2QualificationViewModel 100%
SAPPub.Web.Areas.Profiles.ViewModels.KS5.Level3QualificationViewModel 100%
SAPPub.Web.Areas.Profiles.ViewModels.KS5.ProgressScoreViewModel 100%
SAPPub.Web.Areas.Profiles.ViewModels.ProfileBaseViewModel 100% 100%
SAPPub.Web.Areas.Profiles.ViewModels.SimpleCodedDoubleTableViewModel 100%
SAPPub.Web.Areas.Profiles.ViewModels.SubjectsEnteredBaseModel 66.6%
SAPPub.Web.Constants.Constants 100%
SAPPub.Web.Controllers.CookiesController 90.4% 100%
SAPPub.Web.Controllers.ErrorController 82.3% 100%
SAPPub.Web.Controllers.HealthController 67.5% 100%
SAPPub.Web.Controllers.HelpController 100%
SAPPub.Web.Controllers.HomeController 100%
SAPPub.Web.Controllers.MySchoolsController 100% 100%
SAPPub.Web.Controllers.MySchoolsListController 100% 100%
SAPPub.Web.Controllers.SchoolController 0%
SAPPub.Web.Controllers.SearchController 100% 100%
SAPPub.Web.Extensions.HttpContextExtensions 0% 0%
SAPPub.Web.Helpers.AttainmentHelper 98.3% 100%
SAPPub.Web.Helpers.CommonHelper 100% 100%
SAPPub.Web.Helpers.DisplayField`1 92% 100%
SAPPub.Web.Helpers.DisplayFieldExtensions 100% 100%
SAPPub.Web.Helpers.EnumHelper 100%
SAPPub.Web.Helpers.TempDataHelper 100% 100%
SAPPub.Web.Helpers.UrlHelper 100% 100%
SAPPub.Web.Middleware.DependenciesExtensions 100% 100%
SAPPub.Web.Middleware.GatewayMiddleware 100% 100%
SAPPub.Web.Middleware.GatewayMiddlewareExtensions 0%
SAPPub.Web.Middleware.NotFoundExceptionHandler 50% 50%
SAPPub.Web.Middleware.SecurityHeadersMiddleware 89.1%
SAPPub.Web.Middleware.SecurityHeadersMiddlewareExtensions 100%
SAPPub.Web.Models.BaseViewModel 80% 100%
SAPPub.Web.Models.Common.PagerViewModel 62% 100%
SAPPub.Web.Models.Common.PaginationItem 85.7%
SAPPub.Web.Models.ErrorViewModel 0%
SAPPub.Web.Models.MySchools.MySchoolModel 100%
SAPPub.Web.Models.MySchools.MySchoolsListViewModel 100%
SAPPub.Web.Models.MySchools.RemoveSchoolViewModel 100%
SAPPub.Web.Models.Search.SearchResult 100% 100%
SAPPub.Web.Models.Search.SearchResultsViewModel 100% 100%
SAPPub.Web.Models.SecondarySchool.AcademicPerformanceAdditionalMeasuresView
Model
100%
SAPPub.Web.Models.SecondarySchool.AcademicPerformanceAttainmentAndProgressV
iewModel
100%
SAPPub.Web.Models.SecondarySchool.AcademicPerformanceEnglishAndMathsResults
ViewModel
100%
SAPPub.Web.Models.SecondarySchool.SuccessorOrPredecessorDetailsModel 100%
SAPPub.Web.ViewComponents.Banner.Banner 100%
SAPPub.Web.ViewComponents.ChartWithTableToggle.ChartWithTableToggle 100%
SAPPub.Web.ViewComponents.MySchools.AddSchoolButton 100%
SAPPub.Web.ViewComponents.Pagination.Pagination 100%
SAPPub.Web.ViewComponents.VerticalNavigation.VerticalNavigation 100%
SAPPub.Web.ViewComponents.VerticalNavigation.VerticalNavigationModel 50% 0%
SAPPub.Web.ViewComponents.VerticalNavigationCompareSecondary.VerticalNaviga
tionCompareSecondary
100%
SAPPub.Web.ViewComponents.VerticalNavigationCompareSecondary.VerticalNaviga
tionCompareSecondaryModel
0% 0%
SAPPub.Web.ViewComponents.VerticalNavigationMySchools.VerticalNavigationMyS
chools
100%
SAPSec.Web.Setup.WebApplicationBuilderExtensions 33.8% 12.5%

@github-actions

Copy link
Copy Markdown

No critical or severe accessibility issues found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy A Review App will be created for PRs with this label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant