You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Christian Br�ndle <ch...@yahoo.com> on 2001/08/06 21:42:20 UTC

Authorization Problem

Hi,

I'm new to JMeter. I try to work with a web site that
requires authentication.

I try 
1)to call http://localhost/test/x1.html 
and authenticate with username/password as chris/chris

2) call the page http://localhost/test/1.html

just as a first example

Here is my trial code:

<?xml version="1.0"?>

<TestPlan>
<threadgroups>
<ThreadGroup name="ThreadGroup" numThreads="1">
<controllers>
<Controller
type="org.apache.jmeter.control.OnceOnlyController"
name="Once Only Logic">
<configElements>
<AuthManager name="Http Authorization">
<ConfigElement
type="org.apache.jmeter.protocol.http.control.Authorization">
<property name="password">chris</property>
<property
name="url">http://localhost/test/x1.html</property>
<property name="username">chris</property>
</ConfigElement>
</AuthManager>

</configElements>
<controllers>
</controllers>
</Controller>
<HttpTestSample
type="org.apache.jmeter.protocol.http.control.HttpTestSample"
name="Web Testing">
<defaultUrl>
<ConfigElement
type="org.apache.jmeter.protocol.http.config.UrlConfig">
<property name="port">80</property>
<property name="PROTOCOL">http</property>
<property name="arguments"><Arguments>
</Arguments>
</property>
<property name="domain">localhost</property>
<property name="path">/test/1.html</property>
<property name="method">GET</property>
</ConfigElement></defaultUrl>
<urlList>
</urlList>
<configElements>
</configElements>
<controllers>
</controllers>
</HttpTestSample>

</controllers>
<configElements>
</configElements>
<timers>
<Timer type="org.apache.jmeter.timers.ConstantTimer"
name="Constant Timer">
<delay>1000</delay>
<range>0.0</range>
</Timer>

</timers>
<listeners>
<Filer type="org.apache.jmeter.reporters.Filer"
name="File Reporter" verbose="true" append="false"
file="C:&#92;JMeter-1-6&#92;jakarta-jmeter&#92;output&#92;test1.txt"/>
</listeners>
</ThreadGroup>

</threadgroups>
<configElements>
</configElements>
</TestPlan>

The output I receive on screen is however:

Going to compile the threadgroups
Adding a threadgroup
Starting the test
Starting thread
Sampling url: http://localhost:80/test/1.html
URL = http://localhost:80/test/1.html
java.io.IOException: Authorization Required
        at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java
        at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java
        at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:134)
        at java.lang.Thread.run(Unknown Source)

and the web server (apache) has in its access.log file
just lines like

127.0.0.1 - - [06/Aug/2001:21:05:51 +0200] "GET
/test/1.html HTTP/1.1" 401 475

Any help or working example is very well come.

Thanks,

Chris


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org