You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Kevin Hammond <kh...@home.com> on 2001/11/11 01:28:30 UTC

Still having problems... Re: Unable to get UrlSample to work...

Mike,

I am still having problems creating a default URL.

In CVS, here are the new names for the two main HTTP elements:
1. HTTP Request Defaults (was UrlSample).
2. HTTP Request (was Web Testing).

According, to your email I can create a HTTP Request Defaults element and
enter a domain that will automatically be picked up and used by the HTTP
Request element.  So, I created a HTTP R.D. element and entered
"jakarta.apache.org" into the Server Name field.  Next, I created a HTTP
Request element, and entered "/" in the Path field.

When I run the Test Plan, I get the text "Sampling url: http:/" in my
console, followed by a java.net.ConnectException, which originated from
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java)
.

I tried manually tracing through the code, and got lost.  In
HTTPSampler.getUrlConfig(), we call Entry.getConfigElement, passing it
UrlConfig.class.  From my debug statements, I saw that in my TestPlan, I had
two of them, one for the HTTP R.D. and one for HTTP Request.

[HTTP Request ]
Entry.addConfigElement():
org.apache.jmeter.protocol.http.config.MultipartUrlConfig@5bb966, class
org.apache.jmeter.protocol.http.config.UrlConfig

[HTTP Request Defaults]
Entry.addConfigElement():
org.apache.jmeter.protocol.http.config.MultipartUrlConfig@284fd4, class
org.apache.jmeter.protocol.http.config.MultipartUrlConfig

So, when we call Entry.getConfigElement(), it appears that we are picking up
the HTTP Request, which does not have a web server name stored inside it.
The part I cannot figure out is when do we retrieve the HTTP Request
Defaults entry???

I have attached a Test Plan.
Thanks,
Kevin Hammond



----- Original Message -----
From: "Stover, Michael" <Mi...@usa.xerox.com>
To: "'JMeter Developers List'" <jm...@jakarta.apache.org>
Sent: Monday, November 05, 2001 5:30 AM
Subject: RE: Unable to get UrlSample to work...


> The UrlSample in your Threadgroup doesn't represent a test case - it
> represents configuration information.  Here's what should happen:
>
> Say you have a Web Test under the Threadgroup, but the "domain" field is
> left blank.  You also add a UrlSample element to the threadgroup, and fill
> in only the "domain" field.  When you test, only the Web Test sample gets
> tested, but its domain field is filled in using the bare UrlSample
element.
> Why, you ask?  This would allow one to make a long and involved test
script,
> and make it portable between servers with only a single change to the
> UrlSample element.  All Config Elements work this way (its why you add a
> CookieManager to the threadgroup and not to individual controllers).
>
> -Mike
>
> > -----Original Message-----
> > From: Kevin Hammond [mailto:khammond25@home.com]
> > Sent: Sunday, November 04, 2001 9:22 AM
> > To: jmeter-dev@jakarta.apache.org
> > Subject: Unable to get UrlSample to work...
> >
> >
> > Hi,
> >
> > This sounds like a newbie question...
> >
> > Using the latest CVS code, I added two items to my
> > ThreadGroup: WebTesting
> > and UrlSample.
> >
> > When I run the Test Plan, only the WebTesting element's URL
> > is sampled.
> > Why?  I attached my TestPlan.  I am in the middle of writing
> > the Web Testing
> > documentation and ran into this issue.  Thanks!
> >
> > Thanks,
> > Kevin Hammond
> >
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>