O'Reilly logo

Catalyst 5.8 by Antano Solar John

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing the AddressBook

Testing the address book requires some techniques that we didn't need for ChatStat. Most of the AddressBook is hidden behind a login screen, so we'll have to log in for testing the application. It also requires us to fill out a lot of forms. Finally, it has a JavaScript interface that we can't test without a live web browser. In this section, we'll see how to test those parts of the application.

Logging in

We'll start by adding a test database module to AddressBook. This is almost an exact copy of the one we created for ChatStat, but we add a convenience function for creating a test user and logging in as that user:

package AddressBook::Test::Database::Live; use strict; use warnings; use AddressBook::Schema::AddressDB; use ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required