On 13/11/2009, rosiere <shu.yi.eut...@gmail.com> wrote:
>
>  Hello,
>
>  I would like to develop a Java application, that executes a predefined
>  jmeter test
>
>  scenario, to programmatically send http requests towards a web application
>  on Internet,
>
>  and retrieve some wanted texts from the HTTP response.
>
>  To do this, I need to make a jmx by JMeter's GUI interface, then, tag its
>  HTTP
>
>  parameters. and My Java app will parse the jmx file, replace the tags by
>  real values,
>
>  then execute the jmx and retrieve results.
>
>  The final goal, is to submit programmatically HTML forms, that request a
>  credit
>
>  report from some credit rating agencies' Internet applications. These
>  agencies haven't
>
>  developed any distributed IT services (neither EJB nor Web Services) for
>  such a
>
>  purpose, and they plan to release a web service for requesting credit
>  report, but only
>
>  in late 2010.
>
>
>  For example, this is a paragraph from my jmx file template that logs into an
>  credit
>
>  agency's web app with a login and a password: I shall replace
>  programmatically @LOGIN
>
>  and @PASSWORD with real credentials in my application, then generate a new
>  jmx and
>
>  execute it, and at last, run programmatically the new jmx and retrieve
>  results (such as the id, date,
>
>  content of a credit report). (The same process is only manually available on
>  the credit
>
>  agency's web app, and I would  like to run it programmatically from a Java
>  app.)
>
>
>  <elementProp name="login" elementType="HTTPArgument">
>  <boolProp name="HTTPArgument.always_encode">false</boolProp>
>  <stringProp name="Argument.value">@LOGIN</stringProp>
>  <stringProp name="Argument.metadata">=</stringProp>
>  <boolProp name="HTTPArgument.use_equals">true</boolProp>
>  <stringProp name="Argument.name">login</stringProp>
>  </elementProp>
>
>
>  <elementProp name="password" elementType="HTTPArgument">
>  <boolProp name="HTTPArgument.always_encode">false</boolProp>
>  <stringProp name="Argument.value">@PASSWORD</stringProp>
>  <stringProp name="Argument.metadata">=</stringProp>
>  <boolProp name="HTTPArgument.use_equals">true</boolProp>
>  <stringProp name="Argument.name">password</stringProp>
>  </elementProp>
>
>
>
>  Could you tell me how to achieve this goal and where can I find some
>  examples that
>
>  works in a similar way?
>
>  Thanks a lot.

This is not a suitable application for JMeter; it will involve a lot
of unnecessary work.

You would be much better off using a Java HTTP library such as Apache
HttpClient (http://hc.apache.org/httpcomponents-client/index.html) or
perhaps HttpUnit (http://httpunit.sourceforge.net/)

>  With my best wishes,
>
>  Rosière
>
> --
>  View this message in context: 
> http://old.nabble.com/How-can-I-develop-Java-classes%2C-to-prepare-and-execute-a-.jmx-file-%28JMeter-scenario%29-and-retrieve-wanted-texts-from-its-response--tp26339888p26339888.html
>  Sent from the JMeter - Dev mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
>  For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org

Reply via email to