Skip to content

Conversation

lt-zeeshan
Copy link
Contributor

This pull request updates the PDF results polling and processing logic to align with a new API response format and improves the reliability and clarity of PDF test result reporting. The main changes involve updating field names to match the new API, ensuring required identifiers are present, and improving the structure of result handling.

API Integration and Data Structure Updates:

  • Updated the fetchPdfResults method in httpClient to use the new endpoint (/smartui/2.0/build/screenshots), require project_id and build_id in request parameters, and handle missing projectId with an explicit error.
  • Added projectId to the Build interface and ensured it is set after PDF upload, so subsequent API calls have the required context. [1] [2]

Field Name and Data Mapping Adjustments:

  • Refactored all usages of screenshot and build fields (e.g., screenshotNamescreenshot_name, mismatchPercentagemismatch_percentage, etc.) throughout the polling and grouping utilities to match the new API response structure. [1] [2] [3] [4] [5]
  • Updated how build and project names are accessed in logs and outputs to use the new nested structure in the API response.

Polling Logic and Output Improvements:

  • Increased the maximum polling attempts to 60 for improved reliability and simplified error handling for failed fetches. [1] [2]
  • Improved the formatting and clarity of PDF test summary output, including more accurate mismatch reporting and clearer grouping by PDF. [1] [2]

@parthlambdatest parthlambdatest merged commit 1a66531 into LambdaTest:stage Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants