-1
假设我有一些10试验方法调用Java方法
method_1(),method_2()..... method_10()
和我指定通过Excel工作表作为要运行的测试method_1或method_2(method_testnumber)并基于从excel表格中读取的输入,该方法运行
有没有什么方法可以在不使用“if”循环或“开关”情况下实现这种行为,只需给出一行代码单独变化。例如: input =“method_1”; Object.input();
使用'reflection'来实现这一 – Sanjeev