I've been able to successfully add a new sampler to JMeter. I start jmeter 
and add a new thread group to the Test Plan. I then open up the thread 
group and add my new sampler which is listed in the "Generative Controller" 
menu. I then add a "Graph Results" listener to the thread group. I then 
click "Start" from the "Run" menu. No exceptions are output into the 
console window that JMeter was run from, but it doesn't output any of the 
log statements that I have in every method of the sampler. It just outputs 
"getName" indicating it is calling my class derived from 
AbstractGenerativeController, but it isn't calling the createEntry() method.

The org.apache.jmeter.samplers.Sampler derived class is called SpecialSampler.

Here's the AbstractGenerativeController derived class (I've removed all the 
logging statements to make the code clearer).

public class SpecialTestSampler
         extends AbstractGenerativeController
         implements Serializable
{
        public Class getGuiClass() {
                return SpecialTestGui.class;
        }

        public String getName() {
                return name;
        }
        public void setName(String name) {
                this.name=name;
        }

        public Collection getAddList() {
                return java.util.Collections.EMPTY_LIST;
        }

        public String getClassLabel() {
                return "speciality class";
        }

        public void uncompile() {
                super.uncompile();
        }

        public void addJMeterComponent(JMeterComponentModel child) {
        }

        protected Entry createEntry() {
                Entry entry = new Entry();
                entry.setSamplerClass(SpecialSampler.class);
                return entry;
        }

        private String name;
}


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to