For testing, we used the local development server, and used Postman, which is a powerful tool for manipulating and keeping track of APIs. It also has a powerful suite of tools for testing the APIs, and hence I used it to help test it.
Our API was tested using Postman, and the test scripts and the results are recorded in the testscrpits.postman_collection.json file within the TestScrpits file in our github.
We first tested if the API can fetch the data, then using a known test set of data we checked if the data we got from the scraper was valid compared to the test data. After that, we checked any missing fields in the request such as date and time; and we verified that a bad request handle will be returned in most cases except for keywords, as the keywords are optional items.
Most of the main tests have been done and verified, however certain aspects haven’t been tested yet:
We haven’t tested any errors for any misspelled inputs such as invalid dates or cities
We haven’t tested specific reports other than checking if the server returns a correct response or not as the script for it isn’t fully complete at this time.