refactor test directory path to use local variable