Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semi-automating QA tests #83

Open
o355 opened this issue May 29, 2018 · 0 comments
Open

Semi-automating QA tests #83

o355 opened this issue May 29, 2018 · 0 comments

Comments

@o355
Copy link
Owner

o355 commented May 29, 2018

If you don't know, PyWeather QA is done about a month before release to iron out any bugs. To do this, we use random data in regards to city names, and other data types.

Way back before PWSes and airport queries were introduced, it was pretty simple. Fake name generator, type in the city name, run through all the prompts. If a bug appears note down the city name and the traceback.

However, now with having to input 16 locations per copy of PyWeather (5 for runs 1 & 2 - Default options and random options), it's getting a little tough to manually find this data, and I even considered cancelling FreeNAS QA as a result.

But fear not, I'll soon be including a randomcity.py script with PyWeather in the tools folder for QA and for anyone who wants to debug PyWeather. It'll work like this:

  • The script will fetch fakenamegenerator.com, and with BeautifulSoup read the city name (I have to learn this but it shouldn't be bad)
  • After learning the city name, we query Google's geocoder to get the lat/long of the city.
  • With the lat/long in hand, we query Wunderground's API to get a nearby PWS and airport listing
  • With this data, we pick the closest airport and randomly select one of 10 nearby PWSes.
  • At the end everything is printed out for input into Pyweather.

In addition, this script will have arguments support.

-eu can be used to select to select a random city in the EU (including the UK for convenience) for randomness.
-city "name" can be used to get the nearest airport and a random PWS with a predefined city name.

Development of this script will begin sometime in July, once we get all other minor fixes sorted.

@o355 o355 added this to the 1.0.0 milestone May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant