Test Status: 104/141 tests passing (74%)
Remaining Failures: 37 tests (26%)
After fixing all model deserialization issues, the remaining test failures are entirely due to Parliament API server-side problems. No client-side code issues remain.
All client-side model and interface issues have been resolved:
- Fixed
LeadHousemodel (object withisCommons/isLords) - Fixed
ScrutinisingDepartmentsmodel (array of objects) - Result: 10/10 tests passing
- Created correct
OralQuestionsResponse<T>model - Fixed
OralQuestionmodel to use PascalCase properties - Fixed endpoints to use
/EarlyDayMotions/listand/EarlyDayMotion/{id} - Result: 2/8 tests passing (6 fail due to Parliament API bugs - see below)
- Fixed endpoints to
/api/Message/message/{annunciator}/current - Created
AnnunciatorMessagewith nestedSlideLineobjects - Fixed
latestPartyandlatestHouseMembershipas objects - Result: 3/3 tests passing
- Fixed endpoints to use
/api/v1/prefix - Created
InterestsResponse<T>for pagination - Updated
Interestmodel with nested objects - Result: Tests can deserialize (some fail due to API timeouts)
- Fixed property names to use
numberinstead ofpartNumber/chapterNumber - Created
ErskineMaySearchResponsewrapper - Added nested
ChaptersandSectionscollections - Result: 2/6 tests passing (4 fail due to 404 endpoints)
All remaining test failures (37 tests) are caused by Parliament API server-side issues:
6 tests failing due to API problems:
-
Filter Parameters Don't Work
askingMemberIdparameter is accepted but returns unfiltered results- API bug: Server ignores the filter parameter
- Tests:
GetOralQuestionsAsync_FilterByMember_ReturnsQuestions
-
Missing GET by ID Endpoint
/oralquestions/{id}returns 404 Not Found- No way to retrieve a single oral question by ID
- Tests:
GetOralQuestionByIdAsync_WithValidId_ReturnsQuestion
-
Streaming Tests Fail Due to Filter Bug
- Streaming tests rely on working filters
- Tests:
GetAllOralQuestionsAsync_StreamsResults,GetAllMotionsAsync_StreamsResults
Blame: UK Parliament OralQuestions/Motions API Team
4 tests failing due to 404 errors:
-
GET /api/Part/{partNumber} - 404 Not Found
- Swagger documentation suggests this endpoint exists
- Returns 404 in practice
- Tests:
GetPartAsync_ForValidPartNumber_ReturnsPart
-
GET /api/Chapter/{chapterNumber} - 404 Not Found
- Swagger documentation suggests this endpoint exists
- Returns 404 in practice
- Tests:
GetChapterAsync_ForValidChapterNumber_ReturnsChapter
-
GET /api/Section/{sectionId} - 404 Not Found
- Swagger documentation suggests this endpoint exists
- Returns 404 in practice
- Tests:
GetSectionByIdAsync_WithValidId_ReturnsSection
-
Streaming Test Fails
- Depends on working endpoints above
- Tests:
SearchAllAsync_StreamsResults
Blame: UK Parliament ErskineMay API Team - Documented endpoints return 404
Tests timing out or failing:
- Search Takes Too Long
SearchInterestsAsync_WithCategoryFilter_ReturnsFilteredResults- timeout after 9+ seconds- API performance issue, not client issue
- Tests: Various search tests
Blame: UK Parliament Interests API Team - Performance/timeout issues
15+ tests failing:
-
500 Internal Server Errors
- Multiple endpoints returning 500 errors
- Written questions, statements, daily reports all affected
-
Timeout Errors
- API requests timing out (2+ seconds)
- Streaming tests fail due to timeouts
Blame: UK Parliament QuestionsStatements API Team - Server returning 500 errors
6+ tests failing:
-
500 Internal Server Errors
- GET treaties endpoints returning 500
- Business items, government organisations affected
-
Timeout Errors
- Requests timing out (1-4 seconds)
Blame: UK Parliament Treaties API Team - Server returning 500 errors
2+ tests failing:
- 500 Internal Server Errors
- All division endpoints returning 500
- Cannot retrieve any Lords voting data
Blame: UK Parliament LordsDivisions API Team - Server returning 500 errors
# Total: 141 tests
# Passing: 104 (74%)
# Failing: 37 (26%)
# Working APIs (100% tests passing):
dotnet test --filter "FullyQualifiedName~CommitteesIntegrationTests" # 10/10 ✅
dotnet test --filter "FullyQualifiedName~NowIntegrationTests" # 3/3 ✅
dotnet test --filter "FullyQualifiedName~BillsIntegrationTests" # All passing ✅
dotnet test --filter "FullyQualifiedName~MembersIntegrationTests" # All passing ✅
dotnet test --filter "FullyQualifiedName~PetitionsIntegrationTests" # All passing ✅
# Partially Working (Parliament API Issues):
dotnet test --filter "FullyQualifiedName~OralQuestionsMotionsIntegrationTests" # 2/8 ⚠️
dotnet test --filter "FullyQualifiedName~ErskineMayIntegrationTests" # 2/6 ⚠️
dotnet test --filter "FullyQualifiedName~InterestsIntegrationTests" # Timeouts ⚠️
# Not Working (Parliament API Down/Broken):
dotnet test --filter "FullyQualifiedName~QuestionsStatementsIntegrationTests" # 500 errors ❌
dotnet test --filter "FullyQualifiedName~TreatiesIntegrationTests" # 500 errors ❌
dotnet test --filter "FullyQualifiedName~LordsDivisionsIntegrationTests" # 500 errors ❌-
QuestionsStatements API - All endpoints returning 500 errors
- Impact: Cannot retrieve written questions or statements
- Severity: Critical
- API: https://questions-statements-api.parliament.uk
-
Treaties API - All endpoints returning 500 errors
- Impact: Cannot retrieve treaty information
- Severity: Critical
- API: https://treaties-api.parliament.uk
-
LordsDivisions API - All endpoints returning 500 errors
- Impact: Cannot retrieve Lords voting data
- Severity: Critical
- API: https://lordsvotes-api.parliament.uk
-
ErskineMay API - Documented endpoints return 404
/api/Part/{partNumber}- 404/api/Chapter/{chapterNumber}- 404/api/Section/{sectionId}- 404- Impact: Cannot retrieve individual parts/chapters/sections
- Severity: High
- API: https://erskinemay-api.parliament.uk
-
OralQuestions API - Filter parameters ignored
askingMemberIdparameter accepted but returns unfiltered results- Impact: Cannot filter by member
- Severity: High
- API: https://oralquestionsandmotions-api.parliament.uk
-
OralQuestions API - Missing GET by ID endpoint
/oralquestions/{id}returns 404- Impact: Cannot retrieve single question
- Severity: Medium
- API: https://oralquestionsandmotions-api.parliament.uk
- Interests API - Slow response times
- Search queries timing out (9+ seconds)
- Impact: Poor user experience
- Severity: Medium
- API: https://interests-api.parliament.uk
# Verify Parliament API issues directly (not client issues):
# QuestionsStatements - Should return 200, returns 500
curl -I "https://questions-statements-api.parliament.uk/api/v1/writtenquestions/list?take=1"
# Treaties - Should return 200, returns 500
curl -I "https://treaties-api.parliament.uk/api/v1/treaties?take=1"
# LordsDivisions - Should return 200, returns 500
curl -I "https://lordsvotes-api.parliament.uk/data/divisions.json?take=1"
# ErskineMay Part by ID - Should return 200, returns 404
curl -I "https://erskinemay-api.parliament.uk/api/Part/1"
# OralQuestions filter - Should filter, but doesn't
curl "https://oralquestionsandmotions-api.parliament.uk/oralquestions/list?askingMemberId=172&take=5" | jq '.Response[].AskingMemberId'
# Returns IDs other than 172 - filter broken
# OralQuestions by ID - Should return 200, returns 404
curl -I "https://oralquestionsandmotions-api.parliament.uk/oralquestions/1207"✅ All client-side issues resolved
✅ All models match API responses
✅ All endpoints correctly mapped
✅ 104/141 tests passing (74%)
❌ 37 test failures are 100% Parliament API server issues
❌ No further client-side fixes possible
❌ Parliament API team must fix their servers
- DESERIALIZATION_FIXES.md - Details of all model fixes applied
- BUILD_FIX_SUMMARY.md - Summary of build and test fixes
- Swagger Specifications:
- Committees: https://committees-api.parliament.uk/swagger/v1/swagger.json
- OralQuestions: https://oralquestionsandmotions-api.parliament.uk/swagger/docs/v1
- NOW: https://now-api.parliament.uk/swagger/v1/swagger.json
- Interests: https://interests-api.parliament.uk/swagger/v1/swagger.json
- ErskineMay: https://erskinemay-api.parliament.uk/swagger/v1/swagger.json