Unit testing

Aron Novak - March 9, 2009 - 10:53
Project:OpenID Provider
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Aron Novak
Status:needs review
Description

I wrote some basic functional tests for the module.
For more in-depth testing, it would be good to have two sites, one provider and one "client" site.

AttachmentSize
openid_provider_test.patch3.58 KB

#1

anarcat - March 9, 2009 - 15:58
Title:Functional testing» Unit testing

Isn't this more unit than functional tests?

What coverage are we aiming at now?

#2

Aron Novak - March 10, 2009 - 10:32

Sorry, i wrote nonsense, these are unit tests, not functional tests, of course :)
Coverage, well, i tried to test as many places as possible, some functions cannot be really tested because of the lack of the client part.

#3

anarcat - March 11, 2009 - 03:57

Well, that was what i was wondering: can we test the client part? There are things like http://openidenabled.com/resources/openid-test/diagnose-server/ that can do that...

#4

Aron Novak - March 11, 2009 - 10:22

Well, i think this is a problematic question. This means that you
1) could not test without network connection (however it's not common, but possible, servers behind strict firewall)
2) tests will fail if network fail - you have to find out where is the problem

#5

anarcat - March 12, 2009 - 22:45

Well, tests could be local: we could use the openid.module to do tests against the openid_provider.module. It would be hard because you have to reproduce the behaviour of the web browser but it's possible.

I don't think this idea should block this patch however, which looks nice to me (but I haven't tested it).

 
 

Drupal is a registered trademark of Dries Buytaert.