[Webtest] RE: RE: problem with NT authentication

Michael Dunn webtest@lists.canoo.com
Fri, 14 Apr 2006 15:16:55 -0700


marc,

the following test of htmlunit works fine, therefore there must be
something wrong with webtest's implementation.=20

	public void testNTLM() throws Exception {
		try{
			DefaultCredentialsProvider prov =3D new
DefaultCredentialsProvider();
			prov.addCredentials("*username*","*password*");
		    final WebClient webClient =3D new WebClient();
		    webClient.setCredentialsProvider(prov);
		    final URL url =3D new
URL("http://ts09utl/tmtrack/tmtrack.dll");
		    final HtmlPage page =3D
(HtmlPage)webClient.getPage(url);
		    assertEquals( "TeamTrack", page.getTitleText() );
		} catch(Exception e){
		}
	}

I am having a challenge getting more debug information from the run of
webtest as you suggested, but will continue sometime next week.

later,
mikey


Michael Dunn=20
Product Test Manager=20
Adaptis=20
206 342 7478=20


-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] On Behalf Of Marc Guillemot
Sent: Thursday, April 13, 2006 12:05 AM
To: webtest@lists.canoo.com
Subject: [Webtest] RE: RE: problem with NT authentication


Hi Mike,

I have never tested personally htmlunit with NT authentication but as
far as I've heard from, this is working.

In your case, I would check it first directly with htmlunit without
webtest.
This makes debugging easier and could allow to identify if the problems
come from htmlunit or from webtest. For this purpose, you just have to
setup a project with htmlunit (you can use the libs provided with
webtest), create a WebClient, set the credentials on the
CredentialsProvider and call your page.=20

If it doesn't work, then webtest is not guilty and the problem should be
fixed at the hmlunit level.
If it works, then it means that webtest uses htmlunit incorectly. In
this case it can be interesting to start webtest from your IDE in debug
mode.
Here are some key points to configure when working with Ecllipse:
- create an Eclipse project and put the the Webtest related jars in the
classpath (the easier way is perhaps to checkout from Webtest CVS)
- menu Run / Debug...
- in the dialog on the left side, Configurations, right click on Java
Application to create a new one
- choose the project where the webtest libraries are on the classpath
- choose org.apache.tools.ant.Main as Main class
- in the Arguments tab
  - choose the working directory where you normally start your ant
command
  - add the Programm Arguments you normally write after the ant command

Marc.
--
View this message in context:
http://www.nabble.com/RE%3A-RE%3A-problem-with-NT-authentication-t144058
9.html#a3895592
Sent from the WebTest forum at Nabble.com.

_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest