j-delaney / planner-helper

Easily fetch Rate My Professor, CAPEs, and grade distributions in UCSD's WebReg
https://chrome.google.com/webstore/detail/planner-helper/omoljdnncdeeglgmagijlamhjlagobep
24 stars 14 forks source link

Testing Framework #7

Open j-delaney opened 9 years ago

j-delaney commented 9 years ago

We should set up a testing framework.

cameronellis commented 8 years ago

What do you have in mind?

j-delaney commented 8 years ago

At the moment there are a lot of try{} catch{} statements that log errors, but that's not a very good method. It's possible that CAPE, RMP, or WebReg will change how they format their HTML someday. When this happens, Planner Helper will break and the user will be left quite confused.

Here's what I was thinking would be awesome to have. On loading WebReg, Planner Helper will run some self-tests. These will check things like making sure certain parts of WebReg haven't changed and that RMP, CAPE, and Grade Distribution pages work for fetching data. If these tests don't pass it will log the error and alert the user of the problem so the user isn't left wondering why RMP is never returning anything.

cameronellis commented 7 years ago

I've found this list of professors: http://www.ucsd.edu/catalog/front/faculty.html

We could use it when testing to make sure that it's at least getting some professors from the cape website. And if it gets none of them, then we can figure out that the html may have changed