-
Notifications
You must be signed in to change notification settings - Fork 1
Charter 7: Explore forecast data API with different inputs to discover input validity
mwalker-scottlogic edited this page Jun 11, 2024
·
3 revisions
- Explore forecast data API with different inputs to discover input validity
- Mike Walker-Rose
- 6/6/24
- 45 - 90 mins
- exploring
valid_time_from
,valid_time_to
,location_type
,base_time
&location_name
- Use different heuristics for input validity to find surprises
- Ministry of Testing Heuristics cheat sheet
- Postman QA forecast_data databse
- Use Postman to explore the forecast api and establish if there are any suprises in the inputs the API takes as parameters
-
location_type
- empty - "Input should be 'city'" 422
- number - "Input should be 'city'"
- negative number
- whitespace - "Input should be 'city'"
- long paragraph - "Input should be 'city'"
- <>,
- leading spaces
- missing - "loc": [ "query", "location_type" ], "msg": "Field required"
-
valid_date_from
- missing
- "type": "datetime_from_date_parsing", "loc": [ "query", "valid_date_from" ], "msg": "Input should be a valid datetime or date, input is too short",
- 1 - 200 gets all results
- 2024.06.11T00%3A00%3A00.000%2B00%3A00 - "Input should be a valid datetime or date, invalid date separator, expected
-
" - /
- 11-06-2024 11/06/2024 11.06.2024 Input should be a valid datetime or date, invalid character in year
- empty - 422
- number 4363455634 - 200 ok, returns empty array,
- negative number -56 returns all results
- whitespace - "Input should be a valid datetime or date, invalid character in year"
- long paragraph - ""Input should be a valid datetime or date, invalid character in year""
- <>,
- leading spaces
-
valid_date_to
- missing
- "type": "missing", "loc": [ "query", "valid_date_to" ], "msg": "Field required", "input": null
- 1 - 200 gets an empty array
- 2024.06.12T00%3A00%3A00.000%2B00%3A00 - "Input should be a valid datetime or date, invalid date separator, expected
-
" - / same
- 11-06-2024 11/06/2024 11.06.2024 Input should be a valid datetime or date, invalid character in year
- empty - 422
- number 4363455634 - 200 ok, returns empty array,
- negative number -56 empty array
- whitespace - "Input should be a valid datetime or date, invalid character in day"
- long paragraph - ""Input should be a valid datetime or date, invalid character in year""
- <>,
- leading spaces
-
forecast_base_time
* -
location_name
- number, <>, /, - returns empty array
- big and small
- capitalisation at front required empty - empty array whitespace - empty array long paragraph - took 3s, empty array 200 status
Overall
You can send a body - json, 10 paragraphs of string
impossible dates:
valid_date_from - 0000-06-11T00%3A00%3A00.000%2B00%3A00 500 error
Can't take a year of 10000
-
valid_date_from
,valid_date_to
,forecast_base_time
can take numbers as parameters - using a year of 0000 (e.g 0000-06-11T00%3A00%3A00.000%2B00%3A00) gets a 500 response
- 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
Getting Started and Overview
- Product Description
- Roles and Responsibilities
- User Roles and Goals
- Architectural Design
- Iterations
- Decision Records
- Summary Page Explanation
- Deployment Guide
- Working Practices
- Q&A
Investigations and Notebooks
- CAMs Schema
- Exploratory Notebooks
- Forecast ETL Process
- In Situ air pollution data sources
- Notebook: OpenAQ data overview
- Notebook: Unit conversion
- Data Archive Considerations
Manual Test Charters
- Charter 1 (Comparing ECMWF forecast to database values)
- Charter 2 (Backend performance)
- Charter 3 (Forecast range implementation)
- Charter 4 (In situ bad data)
- Charter 5 (Filtering ppm units)
- Charter 7 (Forecast API input validation)
- Charter 8 (Forecast API database sizes)
- Charter 9 (Measurements summary API input validation)
- Charter 10 (Seeding bad data)
- Charter 11 ()Measurements API input validation
- Charter 12 (Validating echart plot accuracy)
- Charter 13 (Explore UI after data outage)
- Charter 14 (City page address)
- Charter 15 (BugFix diff 0 calculation)
- Charter 16 (City page chart data mocking)
- Charter 17 (Summary table logic)
- Charter 18 (AQI chart colour banding)
- Charter 19 (City page screen sizes)
- Charter 20 (Date picker)
- Charter 21 (Graph consistency)
- Charter 22 (High measurement values)
- Charter 23 (ppm -> µg m³)
- Charter 24 (Textures API input validation)
- Charter 25 (Graph line colours)
- Charter 26 (Fill in gaps in forecast)
- Charter 27 (Graph behaviour with mock data)
- Charter 28 (Summary table accuracy)
- Re‐execute: Charter 28
- Charter 29 (Fill in gaps in situ)
- Charter 30 (Forecast window)
- Charter 31 (UI screen sizes)