ThreadGroup line 273 cloneTree(threadGroupTree),I have setted CSVDataSet with filename,but after cloneTree,my filename was lost
Expected behavior
I hope cloneTree will not lost data in threadGroupTree
Actual behavior
after cloneTree, my data has lost
Steps to reproduce the problem
// 创建一个CSV Data Set Config元件 CSVDataSet csvDataSet = new CSVDataSet(); csvDataSet.setFilename("D:\work\user.csv"); // CSV文件路径 csvDataSet.setVariableNames("username,password"); // CSV文件中的列名 csvDataSet.setDelimiter(","); // CSV文件的分隔符
// 创建一个 LoopController
LoopController loopController = new LoopController();
loopController.setLoops(1); // 设置循环次数
loopController.initialize();
ThreadGroup threadGroup = new ThreadGroup();
threadGroup.setNumThreads(1);
threadGroup.setRampUp(0);
threadGroup.setSamplerController(loopController);
// 创建一个TestPlan
TestPlan testPlan = new TestPlan("My Test Plan");
// 创建一个HashTree来保存TestPlan
ListedHashTree loginPlanTree = new ListedHashTree();
ListedHashTree threadGroupHashTree = (ListedHashTree) loginPlanTree.add(testPlan, threadGroup);
threadGroupHashTree.add(cookieManager);
threadGroupHashTree.add(csvDataSet);
JMeter Version
5.6.3
Java Version
java 17.0.10 2024-01-16 LTS Java(TM) SE Runtime Environment Oracle GraalVM 17.0.10+11.1 (build 17.0.10+11-LTS-jvmci-23.0-b27) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 17.0.10+11.1 (build 17.0.10+11-LTS-jvmci-23.0-b27, mixed mode, sharing)
OS Version
Microsoft Windows 11 家庭中文版
the second picture more info
we must set like this can work well csvDataSet.setProperty("filename", "D:\work\user.csv");