Skip to content

Charter 7: Explore forecast data API with different inputs to discover input validity

mwalker-scottlogic edited this page Jun 11, 2024 · 3 revisions

Charter:

  • Explore forecast data API with different inputs to discover input validity

Testers:

  • Mike Walker-Rose

Date:

  • 6/6/24

Duration:

  • 45 - 90 mins

Scope:

  • exploring valid_time_from, valid_time_to, location_type, base_time & location_name
  • Use different heuristics for input validity to find surprises

References:

  • Ministry of Testing Heuristics cheat sheet
  • Postman QA forecast_data databse

Test Approach:

  • Use Postman to explore the forecast api and establish if there are any suprises in the inputs the API takes as parameters

Notes

  • 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 image Can't take a year of 10000

Conclusion

  • 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 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

vAirify Wiki

Home

Getting Started and Overview

Investigations and Notebooks

Testing

Manual Test Charters

Clone this wiki locally