ECMWFCode4Earth / vAirify

code repository for 2024 Code for Earth project #16
0 stars 0 forks source link

Create an API to query forecast data #24

Closed amehta-scottlogic closed 2 weeks ago

amehta-scottlogic commented 1 month ago

Acceptance Criteria

For this ticket to be done it must include automation

Test Checklist:

mwalker-scottlogic commented 3 weeks ago

Regression tests executed 05/06

mwalker-scottlogic commented 3 weeks ago

Test Analysis

Parameters:

Output:

Interoperability:

Security:

Errors:

Data:

Test Charter:

Regression candidate:

mwalker-scottlogic commented 3 weeks ago

FINDING - valid_date_to doesn't seem to include the upper bound

Steps to reproduce:

Expected:

Actual

Image

Image

Retested

fixed

Image

Image

mwalker-scottlogic commented 2 weeks ago

Finding

Steps to reproduce:

mwalker-scottlogic commented 2 weeks ago

Findings

Image

Image

mwalker-scottlogic commented 2 weeks ago

Finding

Required query param names are not all correct:

amehta-scottlogic commented 2 weeks ago

Findings

  • Discoveries from exploratory testing (see notes)
  • valid_date_from, valid_date_to, forecast_base_time can all take numbers as parameter values, including negative numbers, with a 200 status

Image

  • using a year of 0000 in the datetime gets a 500 error for all date parameters

Image

  • location_name does not seem to have any kind of validation, you can use for example <>, /, - returning an empty array with status 200
  • you can send a body, I was able to send a json and a 10 paragraph string
  • it works with no headers
  • I dropped the collection in MongoDB, I got back an empty array and a 200 response

My opinion on findings:

amehta-scottlogic commented 2 weeks ago

Finding

Required query param names are not all correct:

  • should be valid_time_from, valid_time_to, location_type, base_time
  • actually are valid_date_from, valid_date_to, location_type, forecast_base_time

Agreed with this - will make changes

amehta-scottlogic commented 2 weeks ago

Finding

  • the AC for this ticket has a valid_time key, but we have implemented valid_date

Steps to reproduce:

  • Look in the forecast_data database, observe the valid_date key

Also should be fixed

mwalker-scottlogic commented 2 weeks ago