参考 JMeter 文档中的 notes_on_extending.txt Making a TestBean Plugin For JMeter This component will be a CSV file reading element that will let users easily vary their input data using csv files. Pick a package and make three files: [ComponentName].java (org.apache.jmeter.config.CSVDataSet.java) [ComponentName]BeanInfo.java (org.apache.jmeter.config.CSVDataSetBeanInfo.java) [ComponentName]Resources.properties (org.apache.jmeter.config.CSVDataSetResources.properties) CSVDataSet.java must implement the TestBean interface. In addition, it will extend ConfigTestElement, and implement LoopIterationListener. - TestBean is a marker interface, so there are no methods to implement. - Extending ConfigTestElement will make our component a Config element in a test plan. By extending different abstract classes, you can control the type of element your component will be (ie AbstractSampler, AbstractVisualizer, GenericController, etc - though you can also make different types of elements just by instantiating the right interfaces, the abstract classes can make your life easier). CSVDataSetBeanInfo.java should extend org.apache.jmeter.testbeans.BeanInfoSupport create……
阅读全文