views:

108

answers:

3

We'll be developing a booking engine, a 4-5 step checkout process for reserving rooms with a hotel where there's a lot of complexity involved. Something similar to this.

Has anyone used Selenium for something like this? What kind of tests would I be able to do? Could I set something like Selenium to go through the entire process of step 1 to the last step, making sure rooms are available, things are bookable? I could test stuff like making sure data is sessionized, right?

+1  A: 

Selenium doesn't really count as unit testing; it's integration testing.

For unit testing in PHP, PHPUnit seems to be the tool to use.

pioto
+3  A: 

Unit testing means testing individual components in your code in isolation (eg., a function, class or method). After that, there's functional and integration testing which tests the interaction between components, and finally automated UI testing which is where selenium comes in. These are the most brittle tests, and should definitely not be the first thing on your mind when it comes to architecturing a new system.

blockhead
+1  A: 

Selenium is a great too for functional testing. It allows you to do large integrated tests and check that the functionality that you are expecting the user to be able to do is there.

Selenium should only be used to check that the workflow and functionality the user expects is still there.

AutomatedTester