On 20/04/2009, Prasad Iyer <prasadi...@ymail.com> wrote: > Hi Sebb, > Thanks for being so patient with me. > Since you are persuading me so much. Let us step back. > I guess this would be my last question. > Does creating a controller requires to build JMeter from the scratch? In > other words would I be touching the core JMeter just to create a controller?
I think the best answer to that is, if you need to ask this question, then you probably should not be attempting to do it. > Once again thanks, Help appreciated > > > regards > > > > > > ________________________________ > From: sebb <seb...@gmail.com> > To: JMeter Users List <jmeter-user@jakarta.apache.org> > > Sent: Monday, April 20, 2009 10:00:42 AM > > Subject: Re: Having problem extending Controller > > On 20/04/2009, Prasad Iyer <prasadi...@ymail.com> wrote: > > Following is the test case I want to write. > > Its a workflow testing that I am doing. Depending upon the response of > the first web service. I want to select the other web services. There around > 7 x 20 path that can be selected depending upon the response. > > > > I did try IfController but there are just too many If's. So I thought > about giving it a try. > > > > In that case, it sounds like the Switch Controller is what you want. > > > regards > > > > > > > > > > ________________________________ > > From: sebb <seb...@gmail.com> > > To: JMeter Users List <jmeter-user@jakarta.apache.org> > > > > Sent: Monday, April 20, 2009 9:19:01 AM > > > > Subject: Re: Having problem extending Controller > > > > On 20/04/2009, Prasad Iyer <prasadi...@ymail.com> wrote: > > > I have already done that. But I don't just need one IfController. > > > I still have one week, I would try to find out how the IfController > works > > > > That's my point - you don't really need to know how the If Controller > > works; just change the code that decides whether or not to run its > > children to include whatever additional checks need to be made. > > > > However, it's still not clear to me why the If Controller is > > unsuitable, given that it can process an arbitrary condition using > > either Javascript or any other function or variable. > > > > > Many thanks for the help > > > > > > regards > > > > > > > > > > > > > > > > > > ________________________________ > > > From: sebb <seb...@gmail.com> > > > To: JMeter Users List <jmeter-user@jakarta.apache.org> > > > > > > Sent: Monday, April 20, 2009 4:01:26 AM > > > > > > Subject: Re: Having problem extending Controller > > > > > > On 20/04/2009, Prasad Iyer <prasadi...@ymail.com> wrote: > > > > Thanks for the reply > > > > I tried IfController. But I have too many complicated conditions to > check before executing the sample. > > > > > > Such as? > > > > > > If you really want to write your own code, then the best way to go > > > would probably be to take a copy of If Controller and amend the part > > > that checks the condition, rather than starting afresh. That should be > > > a lot easier. > > > > > > > I am doing web service testing. > > > > I spend around 2 days fiddling with JMeter before asking a question > on mailing list. > > > > Can you please help me? > > > > regards > > > > > > > > > > > > > > > > > > > > ________________________________ > > > > From: sebb <seb...@gmail.com> > > > > To: JMeter Users List <jmeter-user@jakarta.apache.org> > > > > Sent: Sunday, April 19, 2009 4:16:46 PM > > > > Subject: Re: Having problem extending Controller > > > > > > > > > > > > On 19/04/2009, Prasad Iyer <prasadi...@ymail.com> wrote: > > > > > Hi, > > > > > I have created a EmptyController.java which extends the > GenericController. To test a value of the variable. If the variable is empty > I don't want to execute the Sample. > > > > > I am developing this on Eclipse IDE > > > > > My problem is JMeter is throwing an exception. I don't know why > JMeter is not finding the class. Can anyone please help me? I tried using > IfController. But It won't serve my purpose. As I am going to add lot of > validation in this class. > > > > > > > > Why is the If Controller no good? > > > > > > > > Note that the way the controllers interact is the most complicated > > > > part of JMeter, so I would avoid going down that route unless you > are > > > > prepared for a lot of hard work. > > > > > > > > > > > > > > Following is the stack trace > > > > > > > > > > cause-exception : > com.thoughtworks.xstream.converters.ConversionException > > > > > cause-message : EmptyController : EmptyController : > EmptyController : EmptyController > > > > > first-jmeter-class : > org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:87) > > > > > class : org.apache.jmeter.save.ScriptWrapper > > > > > required-type : > org.apache.jorphan.collections.ListedHashTree > > > > > path : > /jmeterTestPlan/hashTree/hashTree/hashTree/hashTree/EmptyController > > > > > line number : 46 > > > > > ------------------------------- > > > > > 2009/04/18 20:40:20 ERROR - jmeter.JMeter: > java.lang.NullPointerException > > > > > at > org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:91) > > > > > at org.apache.jmeter.JMeter.run(JMeter.java:728) > > > > > at org.apache.jmeter.JMeter.startNonGui(JMeter.java:706) > > > > > at org.apache.jmeter.JMeter.start(JMeter.java:361) > > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > > > > > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > > > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > > > > at java.lang.reflect.Method.invoke(Method.java:597) > > > > > at org.apache.jmeter.NewDriver.main(NewDriver.java:210) > > > > > > > > > > > > > > > <!-- > > > > > following is my JMX file > > > > > --> > > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > > <jmeterTestPlan version="1.2" properties="2.1"> > > > > > <hashTree> > > > > > <TestPlan guiclass="TestPlanGui" testclass="TestPlan" > testname="Test Plan" enabled="true"> > > > > > <stringProp name="TestPlan.comments"></stringProp> > > > > > <boolProp name="TestPlan.functional_mode">false</boolProp> > > > > > <boolProp > name="TestPlan.serialize_threadgroups">false</boolProp> > > > > > <elementProp name="TestPlan.user_defined_variables" > elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" > testname="User Defined Variables" enabled="true"> > > > > > <collectionProp name="Arguments.arguments"/> > > > > > </elementProp> > > > > > <stringProp > name="TestPlan.user_define_classpath"></stringProp> > > > > > </TestPlan> > > > > > <hashTree> > > > > > <ThreadGroup guiclass="ThreadGroupGui" > testclass="ThreadGroup" testname="Thread Group" enabled="true"> > > > > > <elementProp name="ThreadGroup.main_controller" > elementType="LoopController" guiclass="LoopControlPanel" > testclass="LoopController" testname="Loop Controller" enabled="true"> > > > > > <boolProp > name="LoopController.continue_forever">false</boolProp> > > > > > <stringProp name="LoopController.loops">1</stringProp> > > > > > </elementProp> > > > > > <stringProp name="ThreadGroup.num_threads">1</stringProp> > > > > > <stringProp name="ThreadGroup.ramp_time">1</stringProp> > > > > > <longProp > name="ThreadGroup.start_time">1240084414000</longProp> > > > > > <longProp > name="ThreadGroup.end_time">1240084414000</longProp> > > > > > <boolProp name="ThreadGroup.scheduler">false</boolProp> > > > > > <stringProp > name="ThreadGroup.on_sample_error">continue</stringProp> > > > > > <stringProp name="ThreadGroup.duration"></stringProp> > > > > > <stringProp name="ThreadGroup.delay"></stringProp> > > > > > </ThreadGroup> > > > > > <hashTree> > > > > > <GenericController guiclass="LogicControllerGui" > testclass="GenericController" testname="Simple Controller" enabled="true"/> > > > > > <hashTree> > > > > > <TestAction guiclass="TestActionGui" > testclass="TestAction" testname="Test Action" enabled="true"> > > > > > <intProp name="ActionProcessor.action">1</intProp> > > > > > <intProp name="ActionProcessor.target">0</intProp> > > > > > <stringProp > name="ActionProcessor.duration"></stringProp> > > > > > </TestAction> > > > > > <hashTree> > > > > > <BeanShellPreProcessor guiclass="TestBeanGUI" > testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" > enabled="true"> > > > > > <stringProp name="filename"></stringProp> > > > > > <stringProp name="parameters"></stringProp> > > > > > <boolProp name="resetInterpreter">false</boolProp> > > > > > <stringProp name="script">vars.put("str", > "dis"); > > > > > System.out.println("hello world");</stringProp> > > > > > </BeanShellPreProcessor> > > > > > <hashTree/> > > > > > </hashTree> > > > > > <EmptyController testclass="EmptyController" > testname="Empty Controller" enabled="true"> > > > > > <stringProp > name="EmptyController.condition">str</stringProp> > > > > > </EmptyController> > > > > > <hashTree> > > > > > <TestAction guiclass="TestActionGui" > testclass="TestAction" testname="Test Action" enabled="true"> > > > > > <intProp name="ActionProcessor.action">1</intProp> > > > > > <intProp name="ActionProcessor.target">0</intProp> > > > > > <stringProp > name="ActionProcessor.duration"></stringProp> > > > > > </TestAction> > > > > > <hashTree> > > > > > <BeanShellPreProcessor guiclass="TestBeanGUI" > testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" > enabled="true"> > > > > > <boolProp name="resetInterpreter">true</boolProp> > > > > > <stringProp name="parameters"></stringProp> > > > > > <stringProp name="filename"></stringProp> > > > > > <stringProp > name="script">System.out.println("hello world");</stringProp> > > > > > </BeanShellPreProcessor> > > > > > <hashTree/> > > > > > </hashTree> > > > > > </hashTree> > > > > > </hashTree> > > > > > </hashTree> > > > > > </hashTree> > > > > > </hashTree> > > > > > </jmeterTestPlan> > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org > > > > For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org > > > For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org > > For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org > For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org