ucsb-cs56-w20 / ucsb-courses-search

Spring Boot App to show similar information to that found at UCSB Curriculum Search page
https://ucsb-courses-search.herokuapp.com
2 stars 5 forks source link

Controller Tests for /byDept #211

Closed pconrad closed 4 years ago

pconrad commented 4 years ago

In this PR, we introduce controller tests for the /byDept search.

This also introduces the possibility of doing Selenium style tests based on HtmlUnit.

On GitHub Actions, the tests do NOT rely on having access to a GitHub client id and client secret, but they DO rely on having access to a UCSB API Key. That is provided in the "Secrets" section of the repository settings. When testing on localhost, you can use the file localhost_api_key_only.json.SAMPLE as a model to create a file called localhost_api_key_only.json (which is in the .gitignore) and then do source key_only.sh just like you would do source env.sh.

This allows you to run your tests in an environment similar to the one that would run on GitHub actions.