方法一:
1.添加一个前置Beanshell
File folder = new File("/path/to/your/folder/with/audiofiles");
File[] audioFiles = folder.listFiles();
Random rnd = new Random();
vars.put("CURRENT_FILE", audioFiles[rnd.nextInt(audioFiles.length)].getAbsolutePath());
原文:https://www.cnblogs.com/songzhenhua/p/10034189.html