Closed amehta-scottlogic closed 2 weeks ago
Regression tests executed 05/06
location
type is invalid, and everything else is handled by FastAPIParameters:
valid_time_from
, valid_time_to
, location_type
& base_time
are required parameters
location_name
is an optional parameter
Output:
location_type
is status 422Interoperability:
Security:
Errors:
Data:
Test Charter:
Regression candidate:
valid_date_to
doesn't seem to include the upper boundSteps to reproduce:
air-pollutant/forecast
endpoint with
forecast_base_time
set to a datetime that overlaps with data in your forecast_data database e.g 2024-06-06T00%3A00%3A00.000%2B00%3A00valid_date_from
set to the same as forecast_base_time
valid_date_to
set to the top end of the expected forecast eg 2024-06-11T00%3A00%3A00.000%2B00%3A00location_type
= citylocation_name
set to a city in the locations databaseExpected:
Actual
fixed
valid_time
key, but we have implemented valid_date
Steps to reproduce:
forecast_data
database, observe the valid_date
keyvalid_date_from
, valid_date_to
, forecast_base_time
can all take numbers as parameter values, including negative numbers, with a 200 statuslocation_name
does not seem to have any kind of validation, you can use for example <>, /, - returning an empty array with status 200Required query param names are not all correct:
valid_time_from
, valid_time_to
, location_type
, base_time
valid_date_from
, valid_date_to
, location_type
, forecast_base_time
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
- using a year of 0000 in the datetime gets a 500 error for all date parameters
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:
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
Finding
- the AC for this ticket has a
valid_time
key, but we have implementedvalid_date
Steps to reproduce:
- Look in the
forecast_data
database, observe thevalid_date
key
Also should be fixed
forecast_api_seeded_data_tests.py
tests now passingforecast_api_validation_tests.py
tests now passing
Acceptance Criteria
For this ticket to be done it must include automation
Test Checklist: