Move runBranchTest function