I have a PR that adds a file CRM/Upgrade/Incremental/sql/4.7.alpha1.mysql.tpl. How should I go about testing this code?
If you don't use civibuild, then you can piece-together a similar workflow using civicrm-upgrade-test.
For more discussion about writing upgrade logic, see Upgrade Reference on the wiki.
For a general, high-level overview of automated tests (including upgrade tests), see Testing on the wiki.