Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use Selenium for a Booking Engine?

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?

like image 312
meder omuraliev Avatar asked Feb 15 '10 03:02

meder omuraliev


3 Answers

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.

like image 70
blockhead Avatar answered Sep 28 '22 18:09

blockhead


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.

like image 27
pioto Avatar answered Sep 28 '22 20:09

pioto


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.

like image 28
AutomatedTester Avatar answered Sep 28 '22 18:09

AutomatedTester