Friday, 15 February 2013

Selenium Auto Test Cases Preparation and Execution

To create and run Selenium Auto Test Cases with the support of PHPUnit, you should have a set up of below listed Softwares and Configurations.

  1. PEAR & PHPUnit -
  2. Selenium Server -

Step1: Add below to Addons to Firefox:
Step2: Restart Mozilla Firefox.

Step3: Configuring Selenium IDE
  1. Open Selenium IDE under  Tools Menu [Ctrl + Shift + S]
  2. Open Options Window under Options Menu
  3. Click on General Tab
  4. Select below listed checkboxes
    1. Record Absolute URL
    2. Remember Base URL
    3. Record assertTitle Automatically
Step4: Creating Test Cases:
  1. Open Selenium IDE under Tools Menu [Ctrl + Shift + S]
  2. Name your Test Case (Example: Rename Untitled to MY HOME PAGE
  3. There will be a Red Color bubble on right hand side. Click that one for start recording. Same will be used for stop recording once it is started
  4.  Test the Required pages that we wish to do.
 Step5: Exporting Created Testcase in PHPUnit Supported Format for Auto Execution.
  1. After Creating your test cases, Export them into PHPUnit File. [File->Export Test Case As -> PHP (PHPUnit)] 

Modify the Exposted PHPunit file to run in CMD Prompt.
Use phpunit filename.php command to Run your test cases.

No comments:

Post a Comment

Thank you so much for providing your valuable feedback. I will will look into them and update my skills & technologies accordingly.