Regression Tests with Symfony - Example

1,021 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,021
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Regression Tests with Symfony - Example

  1. 1. Regression Testing with SymfonyTools and techniques for building your test suite
  2. 2. Part 2: Utilizing the tools Functional tests with the BehatBundle Components of the MinkBundle Selection of Browser Drivers  Zombie JS Driver  Sahi Driver
  3. 3. BDD Test Specification Scenario: Put item in shopping cart Given the case, the customer wants to buy a movie And his shopping cart is empty And there are 2 movies in stock When he puts the item in the shopping cart Then the item should show up in the shopping cart And the shopping cart counter should show 1 And 1 movie should be in stock
  4. 4. Gherkin Language Formal language to define functional tests Entry points using defined keywords  Feature: Set of functional test for a specific domain  Background: Steps that will be executed for each scenario  Scenario: Steps to test a certain behaviour
  5. 5. Gherkin Language Keywords for step definitions  Given: Pre-condition for the scenario  When: Action/Operation to perform  Then: Test for expected result  And: Chaining of step definitions
  6. 6. Behat + Bundle BehatBundle integrates Behat in Symfony Setup of kernel Access to DIC Mapping of Gherkin Located in own directory structure  .feature file to define step definitions  FeatureContext to match the steps
  7. 7. Mink + Bundle MinkBundle integrates Mink into Symfony Encapsulation of various browser drives  GoutteDriver: headless pure-php driver  SahiDriver: JS browser driver with GUI installer  ZombieDriver: Bridge for Zombie.js browser emulator  SeleniumDriver: Bridge to Selenium FeatureContext for common browser operations Setup of application kernel
  8. 8. Thank you for your attiontion!

×