If I understand your question, you have variables that change. You want your test to get these variables without hardcoding it? If that is the case, I would try this.
You can send in parameters via command line:
adb shell am insrument -e <NAME> <VALUE> <package/runner>
You can access the value using the bundle that is available if you override the onCreate
method of the InstrumentationTestRunner
.
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
value = (String) savedInstanceState.get("name");
}