SlideShare a Scribd company logo
Frontend Testing
with Codeception
Christian Keuerleber
... nope, not Unit Tests ;)
About me
• Christian „Herbie“ Keuerleber
• Working at punkt.de since2010
• Certified Integrator
• Frontend-guy doing backend stuff
• Likes to make an error only once
Kabarakh – on Twitter, Slack, GitHub...
Agenda
• What tools will we be using?
• Monitoring
• Behaviour testing
• Testingin continuous integration
• Questions(and hopefully answers)
Tool-Chain
• Php withComposer
• Chrome/Chromium andChromedriver
• For CIwe might need docker
(some) Needed Composer Packages
• codeception/codeception
• automatically installeddependencies:
• facebook/webdriver
• behat/gherkin
• guzzlehttp/guzzle
• webmozart/assert
A completecomposer.json (formonitoring tests)
{
"name": "punktde/punktde-website-monitoring",
"license": "GPL-3.0+",
"require": {
"codeception/codeception": "^3.0"
},
"autoload": {
"psr-4": {
"PunktDePtwMonitoring": "Classes/"
}
}
}
Gherkin?
<?php
classFirstCest
{
public function frontpageWorks(AcceptanceTester $I)
{
$I->amOnPage('/‘);
$I->see('Home‘);
}
}
Gherkin!
Feature:As a website user
inorder to beableto seeany content
I want to see the mainpage
Scenario:
Given I am on "/"
ThenIshouldsee"Home"
Understandabletests arepartofthe foundation oftrust betweenPOs and developers!
Monitoring
Is thewebsite still working?
Did my changes break anything?
Howwill I be notifiedif something breaks?
Monitoring
• non-invasive
• runsonproduction
• can beactually run everywhere
• runsas oftenas possible
• (ideally)many small tests
• usesbrowser – liketheusers
Behaviour testing
aka
Behaviour testing
• Thecodeworks as intended
• Thecodesworks as definedby thePO
• Edgecases andinvalidactions are considered
Behaviour testing
• needs a preparedstate (fixture)
• Arrange, Act, Assert
• manipulates database, files andsuch
• runsin its own environment
• shouldrunbeforecodeis even deployed
• tests can bequite largeandcomplex
• usesall technologies youhave – CLI, SQL, Browser,Guzzle, ...
Continuous Integration
Let's see a live example –and howit is used
... for monitoringat least
Buzzword-Bingo!
!!FREE FIELD!!
user-centric
Contexts
Helper classes
Module
Actor
Actor Traits
Features
Scenarios
Scenario Outline
Populator
YAML data files
Guzzle API Tests
Artifacts
Docker
Tablenodes
Params
Database testing
Reusable steps
codeception.yaml
punkt.de GitHub
packages
Environments
JUnit output
Background
Everyone can write
test files
(https://twitter.com/michelreimon/status/1156125404014321664)
Questions?
Some good-to-knowlinks
• https://codeception.com
• https://cucumber.io/docs/gherkin/reference/
• https://github.com/punktde – searchfor "codeception"
• https://packagist.org/packages/punktde/
• https://github.com/punktDe/codeception-demo

More Related Content

PDF
The bugfix confirmation loop - PyConFI 2013
PPTX
Automated Testing with Cucumber, PhantomJS and Selenium
PDF
The New Frontend Toolchain
PPTX
Autotests introduction - Codeception + PHP Basics
PDF
Debugging and Profiling in WordPress: What is My Site Doing?
PDF
My Top 5 Favorite Gems
PDF
Managing Modules Without Going Crazy (NPW 2007)
PDF
Front-end Automated Testing
The bugfix confirmation loop - PyConFI 2013
Automated Testing with Cucumber, PhantomJS and Selenium
The New Frontend Toolchain
Autotests introduction - Codeception + PHP Basics
Debugging and Profiling in WordPress: What is My Site Doing?
My Top 5 Favorite Gems
Managing Modules Without Going Crazy (NPW 2007)
Front-end Automated Testing

What's hot (20)

PDF
Jest: Frontend Testing richtig gemacht @WebworkerNRW
PDF
Build & deploy PHP application (intro level)
ODP
BDD using Behat, Selenium,Sahi and SauceLabs
PDF
Cucumber.js: Cuke up your JavaScript!
PDF
CommandBox & ForgeBox Package Management
PPT
Subversion @ JUG Milano 11 dic 2009
PDF
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
PDF
3 WAYS TO TEST YOUR COLDFUSION API
PPTX
Automating JavaScript testing with Jasmine and Perl
ODP
Testing Toolbox
PPT
Headless BDD & Responsive Test Automation
KEY
Let's creating your own PHP (tejimaya version)
PDF
I Promise You
PDF
Jest: Frontend Testing leicht gemacht @EnterJS2018
PDF
Continuous delivery of your legacy application
PDF
mod_php vs FastCGI vs FPM vs CLI
PDF
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
PDF
Automate Thyself
PDF
Building testable chrome extensions
PDF
CPAN Workshop, Chicago 2014
Jest: Frontend Testing richtig gemacht @WebworkerNRW
Build & deploy PHP application (intro level)
BDD using Behat, Selenium,Sahi and SauceLabs
Cucumber.js: Cuke up your JavaScript!
CommandBox & ForgeBox Package Management
Subversion @ JUG Milano 11 dic 2009
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
3 WAYS TO TEST YOUR COLDFUSION API
Automating JavaScript testing with Jasmine and Perl
Testing Toolbox
Headless BDD & Responsive Test Automation
Let's creating your own PHP (tejimaya version)
I Promise You
Jest: Frontend Testing leicht gemacht @EnterJS2018
Continuous delivery of your legacy application
mod_php vs FastCGI vs FPM vs CLI
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Automate Thyself
Building testable chrome extensions
CPAN Workshop, Chicago 2014
Ad

Similar to Frontend testing with Codeception (9)

PDF
Mykhailo Bodnarchuk "The history of the Codeception project"
PDF
Acceptance testing in php with Codeception - Techmeetup Edinburgh
PDF
Codeception: introduction to php testing
PDF
Codeception: introduction to php testing (v2 - Aberdeen php)
PDF
Testing with Codeception
PDF
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
PDF
Acceptance & Functional Testing with Codeception - Devspace 2015
PDF
Testing PHP with Codeception
PDF
Testing mit Codeception: Full-stack testing PHP framework
Mykhailo Bodnarchuk "The history of the Codeception project"
Acceptance testing in php with Codeception - Techmeetup Edinburgh
Codeception: introduction to php testing
Codeception: introduction to php testing (v2 - Aberdeen php)
Testing with Codeception
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Acceptance & Functional Testing with Codeception - Devspace 2015
Testing PHP with Codeception
Testing mit Codeception: Full-stack testing PHP framework
Ad

Recently uploaded (20)

PDF
top salesforce developer skills in 2025.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Introduction to Artificial Intelligence
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
System and Network Administraation Chapter 3
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Essential Infomation Tech presentation.pptx
PDF
System and Network Administration Chapter 2
PDF
medical staffing services at VALiNTRY
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Understanding Forklifts - TECH EHS Solution
top salesforce developer skills in 2025.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
Design an Analysis of Algorithms I-SECS-1021-03
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Introduction to Artificial Intelligence
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
System and Network Administraation Chapter 3
VVF-Customer-Presentation2025-Ver1.9.pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Design an Analysis of Algorithms II-SECS-1021-03
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Essential Infomation Tech presentation.pptx
System and Network Administration Chapter 2
medical staffing services at VALiNTRY
Which alternative to Crystal Reports is best for small or large businesses.pdf
Softaken Excel to vCard Converter Software.pdf
Understanding Forklifts - TECH EHS Solution

Frontend testing with Codeception