test: use instance variables instead of local variables

Because:
these are commonly used in TestCommandSelect