Atanas Mendes
Atanas Mendes

Reputation: 75

How to test web service with authentication using JMeter

I'm using Apache JMeter 2.11 to test a web service with authentication. For the sample request I'm using View Results Tree as a listener and a SOAP/XML-RPC Request with the following syntax to my parameters:

What I have tried

1) Adding an HTTP Header Manager using

With result: Response headers: HTTP/1.1 401 Unauthorized

2) Adding an HTTP Authorization Manager using

With result: Response headers: HTTP/1.1 401 Unauthorized

I also tried enabling Keep Alive in the request as suggested here

What am I doing wrong?

Upvotes: 2

Views: 11896

Answers (1)

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34526

First you need to know the auth type, is it basic ? Digest ? Kerberos or other ?

Second, don't use SOAP/XML-RPC Request, use Http Request,

See Templates > Webservice in jmeter menu, it creates a sample test plan for Soap testing.

Add then your authentication with the correct Auth Manager using HttpClient 4 as sampler implementation and check.

Upvotes: 2

Related Questions