I have written automation test cases for my application.Below is the
sample code i have used for web testing.
class UserWebTestcase extends CakeWebTestCase{
var $name='UserWebTestcase';
function testLogin001()
{
//Test if new user registration form works as intended when all
the
inputs are given properly.
$this->get(Configure::read('url'));
$this->setField('email', '[email protected]');
$this->setField('tmppassword', 'admin123');
$this->setField('password_confirm', 'admin123');
$this->clickSubmit('SUBMIT');
$this->assertText('login');
}
}
In test case it always gives false even though the inputs for fields
are correct.The error i got like this
(Failed
C:\xampplite\htdocs\spotchase\app\tests\cases\models\user.test.php ->
UserWebTestcase -> testLogin001).
Im really confused while using the assertText() method.How should i
use this assertText() method and what parameters should i pass to this
method. Please help.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php