Project:Bakery Single Sign-On System
Version:6.x-2.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hello,

Should it be possible to use Bakery within the context of a Simpletest test case on a slave site?

I have tried a basic test case that includes the bakery module in setUp() then sets some variables to connect to the master site. The test case fails when I try $this->drupalLogin(). Looking at the verbose output from Curl, it reports the correct "ending url" (the master site) when POSTing to /user, but the test case fails at parsing the result. It looks like the content is empty. It then reports another fail for "User username successfully logged in."

Is this at all possible?

Comments

#1

Tests for Bakery would be great, but it seems like a difficult one to test for. I'd need more debugging info on the master login process to understand where it's failing.

Another approach might be to create the chocolate chip (authentication cookie) as part of the test setup process.

#2

I use a variety of ways of testing projects, but I'm finding Bakery setups are difficult to test. I had similar problems using Twill (python scriptable browser) as I experienced with Simpletest. I think the issue is linked to how redirects are followed. The only way I've been able to test a Bakery setup has been with Selenium, but it's not ideal.

I'll hopefully get chance to look at the Simpletests again soon and see if I can provide more debug information.

Thanks,

#3

I read about Upal at http://www.acquia.com/upal - anyone know how that works with Bakery?