Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POSSIBLE BUG - discrepancy between prod summary table data and expected from manual calculations #315

Open
4 of 7 tasks
mwalker-scottlogic opened this issue Aug 21, 2024 · 4 comments

Comments

@mwalker-scottlogic
Copy link
Collaborator

mwalker-scottlogic commented Aug 21, 2024

Observed variation between actual summary table data for London (forecast base time: 18 Aug 12:00, forecast window: 1), and expected data from a manual calculation.

Steps to reproduce:

  • query in_situ_data database for:
{ $and: [
  {"measurement_date": { 
    $gte: new ISODate('2024-08-18T10:30:00.000+00:00'), 
    $lte: new ISODate('2024-08-19T13:30:00.000+00:00')}
  },
  {"name": "London"}
]}

  • at each 3hr increment, for each pollutant, average the data for the surrounding +/- 1.5hrs

  • calculate AQI

  • query forecast_data for:

{ $and:[
  {"forecast_base_time": new ISODate('2024-08-18T12:00:00.000+00:00')},
  {"name": "London"}
]}
  • extract from forecast data the first 9 valid times as they will correspond to the time range needed
  • compare UI table for this time range with the data collected

Expected:

  • data in UI corresponds to values that are the greatest difference between forecast and measured AQI
  • the values in the table are the same

Actual:

  • some variance discovered up to 3.15%

Image

  • Some unpredictable behaviour in terms of which time stamp is selected by UI to represent the diff, sometimes it is first time, sometimes a different one selected

Image

Test Checklist:

  • Test Analysis & discussion with developer
  • Write Test Cases / Charters
  • Test Cases & Charters Reviewed
  • Test Cases Executed
  • Test Charters Executed
  • Regression tests executed
  • Automation Tests added to project
@mwalker-scottlogic
Copy link
Collaborator Author

mwalker-scottlogic commented Aug 23, 2024

Test Analysis

Having discussed the issue with @rstrange-scottlogic, it was actually an issue in my calculation that found the divergence - excel was treating long numbers as text and excluding them from the mean calculation.

A change has been made where previously if the measured AQI and forecasted AQI were both 1 for the entire duration of the time, the UI picked the last entry, it now picks the first

  • No automation required.
  • Need to re-execute the manual test to verify values ✅
  • Need to check if the UI uses the first time slot in the above scenario ✅

Charter Re‐execute: Charter 28: Explore production summary table with reference to the database to discover accuracy

@mwalker-scottlogic
Copy link
Collaborator Author

All that is left is for this to undertake regression testing

@mwalker-scottlogic mwalker-scottlogic self-assigned this Aug 27, 2024
@mwalker-scottlogic
Copy link
Collaborator Author

Evidence from re-running charter that the UI is picking the first time slot when the max diff is shared

Image

@mwalker-scottlogic
Copy link
Collaborator Author

mwalker-scottlogic commented Aug 29, 2024

Frontend regression PASSED ✅

Image

Playwright Regression 29.08.24.pdf

Backend regression PASSED ✅

Image

@mwalker-scottlogic mwalker-scottlogic removed their assignment Aug 29, 2024
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

No branches or pull requests

2 participants