tes automation for cms backed applications - channel-4 case study
DESCRIPTION
Testing and automating CMS backed applications is challenging. It is different from testing web applications. In most of the web applications - pages are well defined. Operations which can be performed on them is well defined and there are few moving parts on the page. CMS backed applications on the other hand are usually dynamic. Pages in CMS backed applications are mostly container and pages can have different data and modules every time you look at them. Channel-4, like many media organisations have many websites such as 4Food, 4Beauty, 4Home and so on. These websites are powered by a powerful CMS and test automation in a usual way wouldn't have worked. In this talk, I will share challenges I faced and approach I took for the automation of CMS backed web applications.TRANSCRIPT
Test Automation For CMS Backed Applications
C4- Case StudyAnand Ramdeo
[email protected] www.TestingGeek.com
@testinggeek
Single Content Management
System
MultipleWebsites
Challenge
Let's break the problem
Can editor publish pages with different module combinations?
CMS ==> DBCan page render all the modules properly?
DB ==> Front End
Two main challenges
Can editor publish pages with different module combinations?
CMS ==> DB
Out of Scope for this talk
Can page render all the modules
properly?
DB ==> Front End
When a page is requested
Java applies magic to convert information in DB to JSON format.
Frontend understands JSON and does its magic to render the web page.
Let's consider DB is our oracle.. what do we need to check?
Let's consider DB is our oracle.. what do we need to check?
Java is doing magic properly, i.e information in DB and information present in the JSON is consistent.
Frontend understands Java's magic properly and rendering modules properly.
And there are few more challenges..
Every site is a separate project
Different Teams & Release Cycle
Reuses core functionality
Add New Functionality
Shared core functionality & modular architecture.
Is Page Object model appropriate?
Test Automation
Page is the place holder for modules
Focus on Modulesfollow development
Discovery Structure Data
Discovery Module - What's on the page?
?debug
?debug&xml
Use any XML Parser to get information on the modules present on the page.
Use Data Assertor to check number & type of modules on the page. Testability for the WIN!!
For all the modules on the page..
For (Every_module_identified_on_the_page) {
Call structural_assertions of the module
Call data_assertions of the module}
Structural Assertions..kind of acceptance criteria for the modules
---> Video list module should have link to three video articles
---> Every item in the list should have an image
---> There should be a little play button on top of image
---> Video links should always be internal
---> Every list item should have an image, title and description
Database Assertions.. Actual checks - compare DB and information on the page
---> Order of the articles is same as DB
---> Right images are present on the module
---> Title text of all the article is proper
---> Right description is appearing for all the items in the list
Little more fun?
Go to Sitemap on UAT
Get links_of_all_the_pages
For (Every_link_in_the_sitemap) { Go to that_page Get list_of_modules For (Every_module_on_the_page) {
Call structural_assertions of the module Call data_assertions of the module
} }
Efficient &
Effective
Interested in
Improving efficiency & effectiveness
of your test automation projects? Shameless Promotion :-)
http://testspicer.com/
Thank you for your time & attention
@TestingGeek
www.TestingGeek.comwww.PlannedDeparture.com