Refactoring the creation of TestTasks to remove code duplication.

Created a list of ``TestTask`` names so that the same code doesn't have to be rewritten multiple times.