Yii Framework Forum: Test for registration process involving CAPTCHA - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Test for registration process involving CAPTCHA Rate Topic: -----

#1 User is offline   Jan Simek 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 11-November 09
  • Location:Prague, Czech Republic

Posted 11 March 2010 - 06:45 AM

I would like to write a functional test that would go through the registration process of my project. The problem is that I am using CCaptcha and have no idea how to bypass it. How do I do that?
0

#2 User is offline   vamp 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 181
  • Joined: 30-January 09

Posted 11 March 2010 - 07:55 AM

View PostJan Simek, on 11 March 2010 - 06:45 AM, said:

I would like to write a functional test that would go through the registration process of my project. The problem is that I am using CCaptcha and have no idea how to bypass it. How do I do that?


:)) Machine vs Machine... You can disable captcha etc. (or try to recognize the image :)
-Posted Image-
Thanks, you make me stronger!
0

#3 User is offline   Jan Simek 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 11-November 09
  • Location:Prague, Czech Republic

Posted 11 March 2010 - 08:16 AM

Yea, that's kind of what I was asking. How do I disable it without touching the code outside of tests/ folder? Is it even possible?

What I mean is that I want the test to automatically and only temporarily disable captcha. Just for the testing process you know.
0

#4 User is offline   vamp 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 181
  • Joined: 30-January 09

Posted 11 March 2010 - 08:19 AM

View PostJan Simek, on 11 March 2010 - 08:16 AM, said:

Yea, that's kind of what I was asking. How do I disable it without touching the code outside of tests/ folder? Is it even possible?


You need to set "allowEmpty" to captha validator (when it in "special" enviroment etc.), maybe:

, 'allowEmpty' => YII_DEBUG

-Posted Image-
Thanks, you make me stronger!
0

#5 User is offline   Jan Simek 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 11-November 09
  • Location:Prague, Czech Republic

Posted 11 March 2010 - 08:27 AM

View Postvamp, on 11 March 2010 - 08:19 AM, said:

You need to set "allowEmpty" to captha validator (when it in "special" enviroment etc.), maybe:

, 'allowEmpty' => YII_DEBUG


Oh heavens, how simple was that. Thank you, vamp.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users