End-to-End Test Automation Using TestCafé

Ortus Solutions, Corp
Ortus Solutions, CorpOrtus Solutions, Corp
End-to-End Test Automation using Testcafé
Francisco Mancardi
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA 2
▪ Electronics Engineering Degree, University Buenos Aires.
▪ 30+ experience on development, linux sysadmin,
training, methods & best practices.
▪ working with CFML since 2002
▪ working on testing since 2004 (TestLink)
▪ using open source tools for SDLC since 2002
▪ Methodology Manager at TESISQUARE
COORDINATES:
francisco.mancardi@tesisquare.com
ABOUT ME
Instructor:
* Software Development
* CFML
* Methods
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA2019 © TESI SpA
Years
of Experience
24
2016 2018
+38%
Revenues
Growth rate in
International Business
2X
Branches
The Netherland
France
Spain
Germany
4
Projects
abroad
18%
Countries
37
International
Customers
200
Investments
in innovation
⁓9%
Companies in the
collaborative network
42K
Customer
Retention
99,7%
Customers worldwide
top brands
28%
Millions
Transactions/Years
300
Growth Worldwide Coverage
Facts&Figures
20171995 2000 2005 2010 2015 201920182016 2020
€Millions
0,2
4
12
18
22
31
40
20
27
TESISQUARE® 3
More than 80 CFML Developers
organised in a Product Team
and 4 Delivery Teams
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Agenda - Talk - IntoTheBox 2020
▪ Automated User (web) interface Test/Checks
▪ The Page Object Model
▪ Proposed project folder structure
▪ Example #1 MantisHUB
▪ Example #2 TESISQUARE PLATFORM
▪ Test Automation Tools - Software Selection
▪ Generic / Compliance Checks
▪ Hints / Warnings
▪ Other uses of Browser Automation Scripts
▪ Myths and legends
▪ Final Remarks
▪ References 4
Automated User (web)
interface Test/Checks
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Automated User (web) interface Test/Checks
▪ the behaviour
▪ the layout
▪ the usability
▪the adherence to your corporate design
6
Executing this kind of test in a manual way is a solution that does not scale well.
With web interfaces there are multiple aspects that you probably want to test
around your UI
The Page
Object
Model
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Page Object Model (POM)
REFERENCES:
https://martinfowler.com/bliki/PageObject.
html
https://medium.com/tech-tajawal/page-
object-model-pom-design-pattern-
f9588630800b
8
https://martinfowler.com/bliki/PageObject.html
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Page Object Model (POM)
9
https://martinfowler.com/bliki/PageObject.html
▪ Using a low level API (HTML) you will write
unwieldy test case scripts.
▪ These scripts will be difficult to maintain, and will
suffer a lot when UX changes will happen.
▪ This approach will be ‘not sexy/not appealing’ for
people with a less technical mindset, then you
will not attract business analysts as potential test
script writers.
Proposed project
folder structure
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Project Folder Structure
11
config
one json file for each environment to test.
i.e. Quality Assurance, Test Automation
Pre-production
intothebox.mantishub.io.json
{
"thisFileIs": "configuration for intothebox.mantishub.io",
"baseURL": "https://intothebox.mantishub.io/",
"language": "English"
}
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Project Folder Structure: data
12
data/entities
json files with default values to help in entity
creation tests.
data/localization-l10n
json files with messages in different languages.
data/uploads
sample files good and bad, to be used in file
upload tests.
data/entities/user/user-dogbert.json
{
"I am": "dogbert",
"user-username": "dogbert",
"user-realname": "Dogbert Supreme Ruler of Earth",
"user-access-level": "administrator",
"user-enabled" : true,
"email-field": "dogbert@dilbert.com"
}
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Project Folder Structure: lib
13
lib/helpers
js files with functions or classes that implement
behaviours like:
- login process
- bootstrap toast object model
- result grid object model
- CSRF object model
behaviours reused in the Page Object Models
lib/util
js files with functions or classes that provides
generic functions like:
* access environment variables
* access configuration present in config files
* logger
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Project Folder Structure:
pages
14
here is where all the js files that implements the Page
Object Model of your pages live.
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Project Folder Structure: test
15
here is where all the js files that implements the tests are
placed.
Example :
for the application TESISQUARE PLATFORM our choice
was to recreate the folder structure that mirror our Test
Management System Test Suites design.
Design choice: 1 test -> 1 js file
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Project Folder Structure: test organization
16
TESISQUARE PLATFORM example
Example #1
MantisHub
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - login flow
18
Login Step #1: enter the username
login_page.php Login Step #2: enter the password
login_password_page.php
Then
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - login flow done!
19
You are in!
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - Page Object Model
20
login_page.php pages/login_page.js
login_password_page.php
pages/login_password_page.js
my_view_page.php pages/my_view_page.js
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - Page Object Model - commons
21
User clicks “View Issues”
User clicks “Report Issue”
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - Page Object Model - commons
22
common candidate: the navBar
common candidate: the user identity
@@What about the Search Issue Box?
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - Page Object Model
23
login_page.php
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - Page Object Model
24
login_password_page.php
login_password_page.js
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - tests
25
Naming convention: 3 letters prefix (MantisHuB) + progressive + something descriptive
Test Script Specification
MHB-001.login.js Validate the login process is OK
checking an specific button in nav bar
MHB-002.loginFailure.nopassword.js Validate the login process failure due to no password
provided, using login helper that will return ok/ko.
MHB-003.loginFailure.checkMsgIsDisplayed.js Validate that a user feedback message is displayed,
because login failed
MHB-004.loginFailure.checkMsgText.js Validate the TEXT of the user feedback message
displayed, because login failed.
MHB-005.bannerUserName.js Validate that after successful login the user name is
displayed in the banner.
https://github.com/fmancardi/intoTheBox2020MantisHUB
The Anatomy of a test script
Navigate
Set / change
data
Get data
Validate
your findings
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - MHB-001.login.js
27
Common code, that will be present in each test case
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - MHB-001.login.js
28
Request the Page Object Models needed to implement the test
case.
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - MHB-001.login.js
29
The steps that implements the test case.
expect will exit on condition check FAILURE
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
MantisHub - MHB-004.loginFailure.checkMsgText.js
30
Example #2
TESISQUARE
PLATFORM
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Application UX Listing example
32
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
<cfsavecontent variable=“local.files.listing"><cfoutput>
/**
* @filesource: <filename>
* <pagetitle>
*/
import { Selector } from 'testcafe';
const control = require('@helpers/controls.js');
const lp = require('@/pages/listing.class.js');
/* selectors */
export const searchFields = {
<fields>
}
const resultsFields = {
}
export const manager = new lp.listing();
manager.searchFieldsConfig(searchFields);
Application UX Listing example - POM Template
33
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Page Object Model API
getFilters()
setFilters()
validateFilters()
search()
34
selectRowByIndex()
orderGridByColHeader()
orderGridByColIndex()
moveColToIndex()
resizeColByIndex()
hideColByHeader()
getColHeaders()
getColPositions()
getCellByColHeader()
getRowByIndex()
validateRow()
getButtons()
validateButtons()
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
POM - Helpers - Input Controls API
35
Input Controls
text
combo
multilevel sel
date
checkbox
numeric
hidden
set(value)
get(options)
clear()
validate(expectedValue,msg)
eqlOrMatch(actual, expected)
isReadOnly()
exists()
getFake(prefix)
API
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
POM - Helpers - Input Controls API
36
Script W/O POM
pure HTML API
pom.view.searchFields.ViewStatus.set(‘public’)
POM using Input Controls API
Live Example #2 Sticky Filters
STEPS A
* Filter the list view
* Modify First item
* Access the Rows TAB
* Display filters
* Pin the row number filter
* Set only the row number filter
* Close the filters
Expected Results
* Only the row number filter
is displayed
STEPS B
* Set the row number filter value
to extract zero results.
* Apply filters
Expected Results
* Only the row number filter
is displayed
* Zero Items displayed.
Test Automation Tool:
The Software Selection
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Test Automation Tool Selection Approach
I want to have a tool with Recording Capability
▪ Why?
▪ To reduce time to learn needed by the script developers
▪ To provide developers and business analysts a way
to convert testing effort into a starting point for script development.
I want something not too expensive (< 1000 U$S x seat)
Multibrowser Support is important?
Side effect:
the recorder can be useful
when reporting issues,
reducing operational risks, so
making the maintainers life
easier.
39
There are too many tools!
My Requirements
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Why Test Cafe ?
First approach as usual: Try something Open Source
▪ 3 candidates
▪ Selenium
▪ TestCafe
▪ Cypress
Does a recorder exist?
▪ Selenium - yes, Katalon Recorder Browser extension POC done / Katalon Studio (ECLIPSE)
▪ TestCafe - yes, TestCafe Studio (commercial, not expensive IMHO)
▪ Cypress - no
Multibrowser Support?
▪ Selenium - if the WebDriver is available
▪ TestCafe - yes
▪ Cypress - not now - https://github.com/cypress-io/cypress/issues/310
40
Pay attention: final decision is a matter of ‘feeling’ with the tool
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Other alternative - CodeceptJS
can it provide you more freedom?
41
Helpers: TestCafe,Protractor,Puppeteer,Nigthmare,WebDriver
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
gauge/taiko is worth mentioning
42
Limited Browser support: Chromium
Great features
* Read Evaluate Print (REPL)
* Request/Response stubbing and mocking
*Proximity selectors
Generic /
Compliance
Checks
(no application
logic needed)
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Generic / Compliance / Blind
UX translations
▪ crawl the application checking the labels. You specify for each
HTML ID the localised string
in different languages
UX Compliance
▪ check that feedback messages of a kind have same layout
▪ check icon
▪ check label
▪ check message structure
44
Check all menus
then all buttons.
Report findings
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
UX Compliance check example
45
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Another UX check example
46
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Page content (TABS) driven by configuration
47
Master data management
has several
TABS that changes according
* entity type
* system configuration
* user role
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Page content (TABS) driven by configuration
48
User Roles 2
Configuration options 7
Entities 2
Tabs 12
Lot of combinations
Error prone
WATT
What A Tedious Test!!
JSON file with
configuration
to drive
the checks
James Watt
Hints / Warnings!
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Hint
Generate HTML with test automation in mind
50
In order to automate you will need to be able to access
in a simple way different elements in the User Interface
data-qa-selector attribute
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Warning
JS / JQuery Widgets need special attention
51
The use of widgets like Select2 JQuery plugin can created
some minor issues when creating the automation.
The ID can have a dynamic/random components
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Hint / Warning
The script has to mimic human behaviour
52
Parallelism (promise.all) can break the application
usage flow.
The abstraction to manage the input fields need
to be designed with attribute to specific fill-in order.
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Hint
Move / Shake / resize
53
Sometimes to make that some logic present in the page triggers,
the page resizing is needed. reduce / increase
Bootstrap PopOver issue
Scroll element into view
Sometimes is needed -> testcafè hover()
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Warning
You will need time to analyse the results
54
In the same way that if you active Fusion Reactor you need to allocate time to
analyse the logs, if you add test scripts to your CI system, you need to
allocate time to analyse the test scripts failures.
Other uses for
Browser
Automation
Scripts
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Reach a milestone
56
Taiko is great to do this (also puppeteer)
1) Login ( user + password + click button)
2) open the top level menu option
3) open the first level menu option
4) finally access the feature
Only now you are ready to test your development
How many minutes do you waste in these 4 steps
during the day?
https://github.com/fmancardi/intoTheBox2020MantisHUB/other/mantisHubAccessViewIssues.js
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
Issue reporting (by developers)
57
Developers will be (theoretically) more comfortable
writing a small script to describe how to reach the point
where the issue can be reproduced.
Developers can be the Tom Tom Go for the
Application Maintenance people
Advantages
* reduce misunderstanding
* reduce errors
* increases resolution velocity
Myths & Legends
TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA
E2E Test Automation myths and legends
Get a tool with the test design recorder feature, then
say good bye to the script writing task
(and the script developers).
Facts/Drawbacks
* Play back issues when you do not use Plain Vanilla HTML (jQuery Plugins)
* Dynamic/random data.
* You can not use Page Object Model with the recorder.
59
Anyone can automate the tests without
having written test specifications
▪ how to test the unknown?
▪ very low value tests
Final Remarks
Test Automation Development IS SOFTWARE DEVELOPMENT
Test Automation will reduce the regression testing time
Test Automation provides scalability
- multiple environments (ACF2016/18/Lucee)
- multiple browsers
- intensive regression testing
Test Automation can not be a SIDE PROJECT
References
The Practical Test Pyramid
https://martinfowler.com/articles/practical-test-pyramid.html
Page Object Model (POM) | Design Pattern
https://medium.com/tech-tajawal/page-object-model-pom-design-pattern-f9588630800b
Testing and Checking Refined
https://www.satisfice.com/blog/archives/856
Testing Automation University
https://testautomationu.applitools.com/instructors/angie_jones.html
https://testautomationu.applitools.com/setting-a-foundation-for-successful-test-automation/
Copyright© 2019 TESI SpA. The information contained herein is proprietary and confidential; its disclosure would be extremely useful to competitors that offer similar services.
The material in this document includes a description of concepts result of a significant research and development effort. Therefore TESISQUARE® prohibits the use or disclosure of either full or partial information contained
in this document, including attachments, for purposes different from the offer evaluation aimed at the supply assignment.
THANK YOU T +39 02 89202682
www.tesisquare.com
marketing@tesisquare.com
TESI S.p.A.
Via Mendicità Istruita, 24
12042 Bra (Cuneo)
Headquarters
Via Savigliano, 48
12062 Roreto di Cherasco (Cuneo)
Branches
Milan, Rome, Turin, Padua, Genoa, Bologna
TESI International
Milan, Amsterdam, Paris, Barcelona, Munich
1 de 62

Recomendados

proGrow Presentation - EN por
proGrow Presentation - ENproGrow Presentation - EN
proGrow Presentation - ENmtschan
82 visualizações23 slides
SF webinar - The truth curve applied por
SF webinar - The truth curve appliedSF webinar - The truth curve applied
SF webinar - The truth curve appliedKai Stevens
129 visualizações27 slides
Testing in Magento 2 por
Testing in Magento 2 Testing in Magento 2
Testing in Magento 2 Igor Miniailo
1.4K visualizações61 slides
Thesis por
ThesisThesis
ThesisKaren Harkavy
2 visualizações54 slides
mendix.ppt sateesh.pptx por
mendix.ppt sateesh.pptxmendix.ppt sateesh.pptx
mendix.ppt sateesh.pptxpICHUKULABHUVANASATE
49 visualizações14 slides
The Times They Are a-Changin’: A Data-Driven Portrait of New Trends in How We... por
The Times They Are a-Changin’: A Data-Driven Portrait of New Trends in How We...The Times They Are a-Changin’: A Data-Driven Portrait of New Trends in How We...
The Times They Are a-Changin’: A Data-Driven Portrait of New Trends in How We...Heather Miller
188 visualizações100 slides

Mais conteúdo relacionado

Similar a End-to-End Test Automation Using TestCafé

A Note On The And The Minority Asset Database... por
A Note On The And The Minority Asset Database...A Note On The And The Minority Asset Database...
A Note On The And The Minority Asset Database...Julie Potts
5 visualizações43 slides
Intalio Project Dogfood And Doubleshot por
Intalio Project Dogfood And DoubleshotIntalio Project Dogfood And Doubleshot
Intalio Project Dogfood And DoubleshotTomoaki Sawada
1.9K visualizações17 slides
Workflows and Plone
 - Case supervisiondoc por
Workflows and Plone
 - Case supervisiondocWorkflows and Plone
 - Case supervisiondoc
Workflows and Plone
 - Case supervisiondocRikupekka Oksanen
2K visualizações100 slides
An Assessment Of The Strategic Leadership Of Bill Gates por
An Assessment Of The Strategic Leadership Of Bill GatesAn Assessment Of The Strategic Leadership Of Bill Gates
An Assessment Of The Strategic Leadership Of Bill GatesNatasha Duze
3 visualizações49 slides
Let's Make Pentesting Fun Again! Report writing in 5 minutes. por
Let's Make Pentesting Fun Again! Report writing in 5 minutes.Let's Make Pentesting Fun Again! Report writing in 5 minutes.
Let's Make Pentesting Fun Again! Report writing in 5 minutes.DefCamp
401 visualizações17 slides
20 Practical tips for a successful internationalisation project por
20 Practical tips for a successful internationalisation project20 Practical tips for a successful internationalisation project
20 Practical tips for a successful internationalisation projectecomplexx
419 visualizações32 slides

Similar a End-to-End Test Automation Using TestCafé(20)

A Note On The And The Minority Asset Database... por Julie Potts
A Note On The And The Minority Asset Database...A Note On The And The Minority Asset Database...
A Note On The And The Minority Asset Database...
Julie Potts5 visualizações
Intalio Project Dogfood And Doubleshot por Tomoaki Sawada
Intalio Project Dogfood And DoubleshotIntalio Project Dogfood And Doubleshot
Intalio Project Dogfood And Doubleshot
Tomoaki Sawada1.9K visualizações
Workflows and Plone
 - Case supervisiondoc por Rikupekka Oksanen
Workflows and Plone
 - Case supervisiondocWorkflows and Plone
 - Case supervisiondoc
Workflows and Plone
 - Case supervisiondoc
Rikupekka Oksanen2K visualizações
An Assessment Of The Strategic Leadership Of Bill Gates por Natasha Duze
An Assessment Of The Strategic Leadership Of Bill GatesAn Assessment Of The Strategic Leadership Of Bill Gates
An Assessment Of The Strategic Leadership Of Bill Gates
Natasha Duze3 visualizações
Let's Make Pentesting Fun Again! Report writing in 5 minutes. por DefCamp
Let's Make Pentesting Fun Again! Report writing in 5 minutes.Let's Make Pentesting Fun Again! Report writing in 5 minutes.
Let's Make Pentesting Fun Again! Report writing in 5 minutes.
DefCamp401 visualizações
20 Practical tips for a successful internationalisation project por ecomplexx
20 Practical tips for a successful internationalisation project20 Practical tips for a successful internationalisation project
20 Practical tips for a successful internationalisation project
ecomplexx419 visualizações
Gui application for e mail application por Umesh Mk
Gui application for e mail applicationGui application for e mail application
Gui application for e mail application
Umesh Mk118 visualizações
Innotech Vietnam Profile por Le Phuong
Innotech Vietnam ProfileInnotech Vietnam Profile
Innotech Vietnam Profile
Le Phuong29 visualizações
Enjoying the full stack - Frontend 2010 por Christian Heilmann
Enjoying the full stack - Frontend 2010Enjoying the full stack - Frontend 2010
Enjoying the full stack - Frontend 2010
Christian Heilmann1.3K visualizações
SAP Training Manual Project Systems .pdf por DineshChanakya1
SAP Training Manual Project Systems .pdfSAP Training Manual Project Systems .pdf
SAP Training Manual Project Systems .pdf
DineshChanakya176 visualizações
Documentation of an application revamping program: the Capgemini case study por XWiki
Documentation of an application revamping program: the Capgemini case studyDocumentation of an application revamping program: the Capgemini case study
Documentation of an application revamping program: the Capgemini case study
XWiki419 visualizações
Started in-tech-la-nov-21 por Thinkful
Started in-tech-la-nov-21Started in-tech-la-nov-21
Started in-tech-la-nov-21
Thinkful135 visualizações
Employee Info Starter Kit por joycsc
Employee Info Starter KitEmployee Info Starter Kit
Employee Info Starter Kit
joycsc2.3K visualizações
Documentation project of college management [1] por Priyaranjan Verma
Documentation project of college management [1]Documentation project of college management [1]
Documentation project of college management [1]
Priyaranjan Verma1.8K visualizações
FORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter por Diana Gray, MBA
FORWARD 5 Key Highlights and Product Updates - Philadelphia ChapterFORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
FORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
Diana Gray, MBA51 visualizações
Web 2.0 goes to work for business: Enabling the power of participation por Ross Dawson
Web 2.0 goes to work for business: Enabling the power of participationWeb 2.0 goes to work for business: Enabling the power of participation
Web 2.0 goes to work for business: Enabling the power of participation
Ross Dawson878 visualizações
Annotated Bibliography On Mobile Business Intelligence por Jessica Spell
Annotated Bibliography On Mobile Business IntelligenceAnnotated Bibliography On Mobile Business Intelligence
Annotated Bibliography On Mobile Business Intelligence
Jessica Spell2 visualizações
IRJET- Implementation of E-Marketing using SPIP, Mysql Database, Html, and Bo... por IRJET Journal
IRJET- Implementation of E-Marketing using SPIP, Mysql Database, Html, and Bo...IRJET- Implementation of E-Marketing using SPIP, Mysql Database, Html, and Bo...
IRJET- Implementation of E-Marketing using SPIP, Mysql Database, Html, and Bo...
IRJET Journal16 visualizações
Pos 355 Cisco Ios por Courtney Bennett
Pos 355 Cisco IosPos 355 Cisco Ios
Pos 355 Cisco Ios
Courtney Bennett3 visualizações
11.0001www.iiste.org call for paper. quality control solutions for niche mark... por Alexander Decker
11.0001www.iiste.org call for paper. quality control solutions for niche mark...11.0001www.iiste.org call for paper. quality control solutions for niche mark...
11.0001www.iiste.org call for paper. quality control solutions for niche mark...
Alexander Decker669 visualizações

Mais de Ortus Solutions, Corp

Luis Majano The Battlefield ORM por
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORMOrtus Solutions, Corp
28 visualizações74 slides
Brad Wood - CommandBox CLI por
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Ortus Solutions, Corp
59 visualizações55 slides
Secure your Secrets and Settings in ColdFusion por
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionOrtus Solutions, Corp
73 visualizações97 slides
Daniel Garcia ContentBox: CFSummit 2023 por
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Ortus Solutions, Corp
41 visualizações40 slides
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf por
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfOrtus Solutions, Corp
14 visualizações21 slides
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf por
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfOrtus Solutions, Corp
14 visualizações51 slides

Mais de Ortus Solutions, Corp(20)

Luis Majano The Battlefield ORM por Ortus Solutions, Corp
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORM
Ortus Solutions, Corp28 visualizações
Secure your Secrets and Settings in ColdFusion por Ortus Solutions, Corp
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusion
Ortus Solutions, Corp73 visualizações
Daniel Garcia ContentBox: CFSummit 2023 por Ortus Solutions, Corp
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023
Ortus Solutions, Corp41 visualizações
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf por Ortus Solutions, Corp
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
Ortus Solutions, Corp14 visualizações
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf por Ortus Solutions, Corp
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
Ortus Solutions, Corp14 visualizações
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf por Ortus Solutions, Corp
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
Ortus Solutions, Corp6 visualizações
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf por Ortus Solutions, Corp
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
Ortus Solutions, Corp11 visualizações
ITB_2023_CBWire_v3_Grant_Copley.pdf por Ortus Solutions, Corp
ITB_2023_CBWire_v3_Grant_Copley.pdfITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdf
Ortus Solutions, Corp7 visualizações
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf por Ortus Solutions, Corp
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
Ortus Solutions, Corp16 visualizações
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf por Ortus Solutions, Corp
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
Ortus Solutions, Corp4 visualizações
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf por Ortus Solutions, Corp
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
Ortus Solutions, Corp8 visualizações
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf por Ortus Solutions, Corp
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
Ortus Solutions, Corp19 visualizações
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf por Ortus Solutions, Corp
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
Ortus Solutions, Corp6 visualizações
ITB2023 Developing for Performance - Denard Springle.pdf por Ortus Solutions, Corp
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdf
Ortus Solutions, Corp14 visualizações
Enterprise Messaging with RabbitMQ.pdf por Ortus Solutions, Corp
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
Ortus Solutions, Corp90 visualizações
Into The Box 2023 Keynote Day 1 por Ortus Solutions, Corp
Into The Box 2023 Keynote Day 1Into The Box 2023 Keynote Day 1
Into The Box 2023 Keynote Day 1
Ortus Solutions, Corp17 visualizações
Secure all things with CBSecurity 3 por Ortus Solutions, Corp
Secure all things with CBSecurity 3Secure all things with CBSecurity 3
Secure all things with CBSecurity 3
Ortus Solutions, Corp17 visualizações
CBSecurity 3 - Secure Your ColdBox Applications por Ortus Solutions, Corp
CBSecurity 3 - Secure Your ColdBox ApplicationsCBSecurity 3 - Secure Your ColdBox Applications
CBSecurity 3 - Secure Your ColdBox Applications
Ortus Solutions, Corp51 visualizações

Último

STPI OctaNE CoE Brochure.pdf por
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdfmadhurjyapb
14 visualizações1 slide
PRODUCT PRESENTATION.pptx por
PRODUCT PRESENTATION.pptxPRODUCT PRESENTATION.pptx
PRODUCT PRESENTATION.pptxangelicacueva6
15 visualizações1 slide
Future of AR - Facebook Presentation por
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentationssuserb54b561
15 visualizações27 slides
Case Study Copenhagen Energy and Business Central.pdf por
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdfAitana
16 visualizações3 slides
Evolving the Network Automation Journey from Python to Platforms por
Evolving the Network Automation Journey from Python to PlatformsEvolving the Network Automation Journey from Python to Platforms
Evolving the Network Automation Journey from Python to PlatformsNetwork Automation Forum
13 visualizações21 slides
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf por
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdfDr. Jimmy Schwarzkopf
20 visualizações29 slides

Último(20)

STPI OctaNE CoE Brochure.pdf por madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 visualizações
PRODUCT PRESENTATION.pptx por angelicacueva6
PRODUCT PRESENTATION.pptxPRODUCT PRESENTATION.pptx
PRODUCT PRESENTATION.pptx
angelicacueva615 visualizações
Future of AR - Facebook Presentation por ssuserb54b561
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
ssuserb54b56115 visualizações
Case Study Copenhagen Energy and Business Central.pdf por Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 visualizações
Evolving the Network Automation Journey from Python to Platforms por Network Automation Forum
Evolving the Network Automation Journey from Python to PlatformsEvolving the Network Automation Journey from Python to Platforms
Evolving the Network Automation Journey from Python to Platforms
Network Automation Forum13 visualizações
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf por Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
Dr. Jimmy Schwarzkopf20 visualizações
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive por Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Network Automation Forum34 visualizações
PharoJS - Zürich Smalltalk Group Meetup November 2023 por Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi132 visualizações
SAP Automation Using Bar Code and FIORI.pdf por Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Virendra Rai, PMP23 visualizações
Info Session November 2023.pdf por AleksandraKoprivica4
Info Session November 2023.pdfInfo Session November 2023.pdf
Info Session November 2023.pdf
AleksandraKoprivica413 visualizações
Uni Systems for Power Platform.pptx por Uni Systems S.M.S.A.
Uni Systems for Power Platform.pptxUni Systems for Power Platform.pptx
Uni Systems for Power Platform.pptx
Uni Systems S.M.S.A.56 visualizações
Ransomware is Knocking your Door_Final.pdf por Security Bootcamp
Ransomware is Knocking your Door_Final.pdfRansomware is Knocking your Door_Final.pdf
Ransomware is Knocking your Door_Final.pdf
Security Bootcamp59 visualizações
Melek BEN MAHMOUD.pdf por MelekBenMahmoud
Melek BEN MAHMOUD.pdfMelek BEN MAHMOUD.pdf
Melek BEN MAHMOUD.pdf
MelekBenMahmoud14 visualizações
Mini-Track: Challenges to Network Automation Adoption por Network Automation Forum
Mini-Track: Challenges to Network Automation AdoptionMini-Track: Challenges to Network Automation Adoption
Mini-Track: Challenges to Network Automation Adoption
Network Automation Forum13 visualizações
Special_edition_innovator_2023.pdf por WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2218 visualizações
MVP and prioritization.pdf por rahuldharwal141
MVP and prioritization.pdfMVP and prioritization.pdf
MVP and prioritization.pdf
rahuldharwal14131 visualizações
Democratising digital commerce in India-Report por Kapil Khandelwal (KK)
Democratising digital commerce in India-ReportDemocratising digital commerce in India-Report
Democratising digital commerce in India-Report
Kapil Khandelwal (KK)18 visualizações
Unit 1_Lecture 2_Physical Design of IoT.pdf por StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec12 visualizações
Microsoft Power Platform.pptx por Uni Systems S.M.S.A.
Microsoft Power Platform.pptxMicrosoft Power Platform.pptx
Microsoft Power Platform.pptx
Uni Systems S.M.S.A.53 visualizações

End-to-End Test Automation Using TestCafé

  • 1. End-to-End Test Automation using Testcafé Francisco Mancardi
  • 2. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA 2 ▪ Electronics Engineering Degree, University Buenos Aires. ▪ 30+ experience on development, linux sysadmin, training, methods & best practices. ▪ working with CFML since 2002 ▪ working on testing since 2004 (TestLink) ▪ using open source tools for SDLC since 2002 ▪ Methodology Manager at TESISQUARE COORDINATES: francisco.mancardi@tesisquare.com ABOUT ME Instructor: * Software Development * CFML * Methods
  • 3. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA2019 © TESI SpA Years of Experience 24 2016 2018 +38% Revenues Growth rate in International Business 2X Branches The Netherland France Spain Germany 4 Projects abroad 18% Countries 37 International Customers 200 Investments in innovation ⁓9% Companies in the collaborative network 42K Customer Retention 99,7% Customers worldwide top brands 28% Millions Transactions/Years 300 Growth Worldwide Coverage Facts&Figures 20171995 2000 2005 2010 2015 201920182016 2020 €Millions 0,2 4 12 18 22 31 40 20 27 TESISQUARE® 3 More than 80 CFML Developers organised in a Product Team and 4 Delivery Teams
  • 4. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Agenda - Talk - IntoTheBox 2020 ▪ Automated User (web) interface Test/Checks ▪ The Page Object Model ▪ Proposed project folder structure ▪ Example #1 MantisHUB ▪ Example #2 TESISQUARE PLATFORM ▪ Test Automation Tools - Software Selection ▪ Generic / Compliance Checks ▪ Hints / Warnings ▪ Other uses of Browser Automation Scripts ▪ Myths and legends ▪ Final Remarks ▪ References 4
  • 6. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Automated User (web) interface Test/Checks ▪ the behaviour ▪ the layout ▪ the usability ▪the adherence to your corporate design 6 Executing this kind of test in a manual way is a solution that does not scale well. With web interfaces there are multiple aspects that you probably want to test around your UI
  • 8. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Page Object Model (POM) REFERENCES: https://martinfowler.com/bliki/PageObject. html https://medium.com/tech-tajawal/page- object-model-pom-design-pattern- f9588630800b 8 https://martinfowler.com/bliki/PageObject.html
  • 9. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Page Object Model (POM) 9 https://martinfowler.com/bliki/PageObject.html ▪ Using a low level API (HTML) you will write unwieldy test case scripts. ▪ These scripts will be difficult to maintain, and will suffer a lot when UX changes will happen. ▪ This approach will be ‘not sexy/not appealing’ for people with a less technical mindset, then you will not attract business analysts as potential test script writers.
  • 11. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Project Folder Structure 11 config one json file for each environment to test. i.e. Quality Assurance, Test Automation Pre-production intothebox.mantishub.io.json { "thisFileIs": "configuration for intothebox.mantishub.io", "baseURL": "https://intothebox.mantishub.io/", "language": "English" }
  • 12. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Project Folder Structure: data 12 data/entities json files with default values to help in entity creation tests. data/localization-l10n json files with messages in different languages. data/uploads sample files good and bad, to be used in file upload tests. data/entities/user/user-dogbert.json { "I am": "dogbert", "user-username": "dogbert", "user-realname": "Dogbert Supreme Ruler of Earth", "user-access-level": "administrator", "user-enabled" : true, "email-field": "dogbert@dilbert.com" }
  • 13. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Project Folder Structure: lib 13 lib/helpers js files with functions or classes that implement behaviours like: - login process - bootstrap toast object model - result grid object model - CSRF object model behaviours reused in the Page Object Models lib/util js files with functions or classes that provides generic functions like: * access environment variables * access configuration present in config files * logger
  • 14. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Project Folder Structure: pages 14 here is where all the js files that implements the Page Object Model of your pages live.
  • 15. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Project Folder Structure: test 15 here is where all the js files that implements the tests are placed. Example : for the application TESISQUARE PLATFORM our choice was to recreate the folder structure that mirror our Test Management System Test Suites design. Design choice: 1 test -> 1 js file
  • 16. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Project Folder Structure: test organization 16 TESISQUARE PLATFORM example
  • 18. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - login flow 18 Login Step #1: enter the username login_page.php Login Step #2: enter the password login_password_page.php Then
  • 19. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - login flow done! 19 You are in!
  • 20. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - Page Object Model 20 login_page.php pages/login_page.js login_password_page.php pages/login_password_page.js my_view_page.php pages/my_view_page.js
  • 21. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - Page Object Model - commons 21 User clicks “View Issues” User clicks “Report Issue”
  • 22. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - Page Object Model - commons 22 common candidate: the navBar common candidate: the user identity @@What about the Search Issue Box?
  • 23. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - Page Object Model 23 login_page.php
  • 24. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - Page Object Model 24 login_password_page.php login_password_page.js
  • 25. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - tests 25 Naming convention: 3 letters prefix (MantisHuB) + progressive + something descriptive Test Script Specification MHB-001.login.js Validate the login process is OK checking an specific button in nav bar MHB-002.loginFailure.nopassword.js Validate the login process failure due to no password provided, using login helper that will return ok/ko. MHB-003.loginFailure.checkMsgIsDisplayed.js Validate that a user feedback message is displayed, because login failed MHB-004.loginFailure.checkMsgText.js Validate the TEXT of the user feedback message displayed, because login failed. MHB-005.bannerUserName.js Validate that after successful login the user name is displayed in the banner. https://github.com/fmancardi/intoTheBox2020MantisHUB
  • 26. The Anatomy of a test script Navigate Set / change data Get data Validate your findings
  • 27. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - MHB-001.login.js 27 Common code, that will be present in each test case
  • 28. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - MHB-001.login.js 28 Request the Page Object Models needed to implement the test case.
  • 29. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - MHB-001.login.js 29 The steps that implements the test case. expect will exit on condition check FAILURE
  • 30. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA MantisHub - MHB-004.loginFailure.checkMsgText.js 30
  • 32. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Application UX Listing example 32
  • 33. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA <cfsavecontent variable=“local.files.listing"><cfoutput> /** * @filesource: <filename> * <pagetitle> */ import { Selector } from 'testcafe'; const control = require('@helpers/controls.js'); const lp = require('@/pages/listing.class.js'); /* selectors */ export const searchFields = { <fields> } const resultsFields = { } export const manager = new lp.listing(); manager.searchFieldsConfig(searchFields); Application UX Listing example - POM Template 33
  • 34. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Page Object Model API getFilters() setFilters() validateFilters() search() 34 selectRowByIndex() orderGridByColHeader() orderGridByColIndex() moveColToIndex() resizeColByIndex() hideColByHeader() getColHeaders() getColPositions() getCellByColHeader() getRowByIndex() validateRow() getButtons() validateButtons()
  • 35. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA POM - Helpers - Input Controls API 35 Input Controls text combo multilevel sel date checkbox numeric hidden set(value) get(options) clear() validate(expectedValue,msg) eqlOrMatch(actual, expected) isReadOnly() exists() getFake(prefix) API
  • 36. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA POM - Helpers - Input Controls API 36 Script W/O POM pure HTML API pom.view.searchFields.ViewStatus.set(‘public’) POM using Input Controls API
  • 37. Live Example #2 Sticky Filters STEPS A * Filter the list view * Modify First item * Access the Rows TAB * Display filters * Pin the row number filter * Set only the row number filter * Close the filters Expected Results * Only the row number filter is displayed STEPS B * Set the row number filter value to extract zero results. * Apply filters Expected Results * Only the row number filter is displayed * Zero Items displayed.
  • 38. Test Automation Tool: The Software Selection
  • 39. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Test Automation Tool Selection Approach I want to have a tool with Recording Capability ▪ Why? ▪ To reduce time to learn needed by the script developers ▪ To provide developers and business analysts a way to convert testing effort into a starting point for script development. I want something not too expensive (< 1000 U$S x seat) Multibrowser Support is important? Side effect: the recorder can be useful when reporting issues, reducing operational risks, so making the maintainers life easier. 39 There are too many tools! My Requirements
  • 40. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Why Test Cafe ? First approach as usual: Try something Open Source ▪ 3 candidates ▪ Selenium ▪ TestCafe ▪ Cypress Does a recorder exist? ▪ Selenium - yes, Katalon Recorder Browser extension POC done / Katalon Studio (ECLIPSE) ▪ TestCafe - yes, TestCafe Studio (commercial, not expensive IMHO) ▪ Cypress - no Multibrowser Support? ▪ Selenium - if the WebDriver is available ▪ TestCafe - yes ▪ Cypress - not now - https://github.com/cypress-io/cypress/issues/310 40 Pay attention: final decision is a matter of ‘feeling’ with the tool
  • 41. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Other alternative - CodeceptJS can it provide you more freedom? 41 Helpers: TestCafe,Protractor,Puppeteer,Nigthmare,WebDriver
  • 42. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA gauge/taiko is worth mentioning 42 Limited Browser support: Chromium Great features * Read Evaluate Print (REPL) * Request/Response stubbing and mocking *Proximity selectors
  • 44. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Generic / Compliance / Blind UX translations ▪ crawl the application checking the labels. You specify for each HTML ID the localised string in different languages UX Compliance ▪ check that feedback messages of a kind have same layout ▪ check icon ▪ check label ▪ check message structure 44 Check all menus then all buttons. Report findings
  • 45. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA UX Compliance check example 45
  • 46. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Another UX check example 46
  • 47. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Page content (TABS) driven by configuration 47 Master data management has several TABS that changes according * entity type * system configuration * user role
  • 48. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Page content (TABS) driven by configuration 48 User Roles 2 Configuration options 7 Entities 2 Tabs 12 Lot of combinations Error prone WATT What A Tedious Test!! JSON file with configuration to drive the checks James Watt
  • 50. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Hint Generate HTML with test automation in mind 50 In order to automate you will need to be able to access in a simple way different elements in the User Interface data-qa-selector attribute
  • 51. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Warning JS / JQuery Widgets need special attention 51 The use of widgets like Select2 JQuery plugin can created some minor issues when creating the automation. The ID can have a dynamic/random components
  • 52. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Hint / Warning The script has to mimic human behaviour 52 Parallelism (promise.all) can break the application usage flow. The abstraction to manage the input fields need to be designed with attribute to specific fill-in order.
  • 53. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Hint Move / Shake / resize 53 Sometimes to make that some logic present in the page triggers, the page resizing is needed. reduce / increase Bootstrap PopOver issue Scroll element into view Sometimes is needed -> testcafè hover()
  • 54. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Warning You will need time to analyse the results 54 In the same way that if you active Fusion Reactor you need to allocate time to analyse the logs, if you add test scripts to your CI system, you need to allocate time to analyse the test scripts failures.
  • 56. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Reach a milestone 56 Taiko is great to do this (also puppeteer) 1) Login ( user + password + click button) 2) open the top level menu option 3) open the first level menu option 4) finally access the feature Only now you are ready to test your development How many minutes do you waste in these 4 steps during the day? https://github.com/fmancardi/intoTheBox2020MantisHUB/other/mantisHubAccessViewIssues.js
  • 57. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA Issue reporting (by developers) 57 Developers will be (theoretically) more comfortable writing a small script to describe how to reach the point where the issue can be reproduced. Developers can be the Tom Tom Go for the Application Maintenance people Advantages * reduce misunderstanding * reduce errors * increases resolution velocity
  • 59. TESISQUARE® 2019© TESI SpATESISQUARE® 2019© TESI SpA E2E Test Automation myths and legends Get a tool with the test design recorder feature, then say good bye to the script writing task (and the script developers). Facts/Drawbacks * Play back issues when you do not use Plain Vanilla HTML (jQuery Plugins) * Dynamic/random data. * You can not use Page Object Model with the recorder. 59 Anyone can automate the tests without having written test specifications ▪ how to test the unknown? ▪ very low value tests
  • 60. Final Remarks Test Automation Development IS SOFTWARE DEVELOPMENT Test Automation will reduce the regression testing time Test Automation provides scalability - multiple environments (ACF2016/18/Lucee) - multiple browsers - intensive regression testing Test Automation can not be a SIDE PROJECT
  • 61. References The Practical Test Pyramid https://martinfowler.com/articles/practical-test-pyramid.html Page Object Model (POM) | Design Pattern https://medium.com/tech-tajawal/page-object-model-pom-design-pattern-f9588630800b Testing and Checking Refined https://www.satisfice.com/blog/archives/856 Testing Automation University https://testautomationu.applitools.com/instructors/angie_jones.html https://testautomationu.applitools.com/setting-a-foundation-for-successful-test-automation/
  • 62. Copyright© 2019 TESI SpA. The information contained herein is proprietary and confidential; its disclosure would be extremely useful to competitors that offer similar services. The material in this document includes a description of concepts result of a significant research and development effort. Therefore TESISQUARE® prohibits the use or disclosure of either full or partial information contained in this document, including attachments, for purposes different from the offer evaluation aimed at the supply assignment. THANK YOU T +39 02 89202682 www.tesisquare.com marketing@tesisquare.com TESI S.p.A. Via Mendicità Istruita, 24 12042 Bra (Cuneo) Headquarters Via Savigliano, 48 12062 Roreto di Cherasco (Cuneo) Branches Milan, Rome, Turin, Padua, Genoa, Bologna TESI International Milan, Amsterdam, Paris, Barcelona, Munich

Notas do Editor

  1. Speaker’s Note Object: Introduce the main figures and facts about TESISQUARE Notes: Substantiate your storytelling with figures company. Start animation on mouse click. Suggested speaking note: Growth: Founded in 1995 in Bra (Cuneo, Italy), TESISQUARE® has been experiencing steady growth in the last years - 35 million euros turnover forecasts in 2019 and 38% revenues growth rate in 2016-2018. Worldwide coverage: The company operates both nationally (Milan, Turin, Rome, Padua, Genoa, and Bologna) and internationally in The Netherlands, France, Spain, and Germany. As a result of global growth, TESISQUARE®’s International Business is growing 2 X faster than Italian market, ranging 18% of projects abroad, and a customer base of 200 customers across 37 countries in 2018. 2019 Forecasts 43 countries including EDI. Facts&figures: 24 years’ experience in design collaborative digital ecosystems, allowed TESISQUARE® to invest nearly 9% of revenue in innovative platforms, reaching a customer retention rate of 99,7%. Our platforms manage a collaborative network including 42K companies with 300 million transactions/flows per year.
  2. Here