SlideShare a Scribd company logo
1
Wix Automation
Itay Shmool & Roi Ashkenazi
DIY -Testing BI Events
2
Introduction & key factors
• Automation developers can change the tested application itself for
the automation needs
• Programming language is not a barrier (JS in our example) -
knowledge and deep understating of the tested application code
• Don’t wait for developers to do it for you – DIY
3
BI Events Testing
• BI – Business Intelligence
• Monitoring behavior of applications
• Statistical analysis
4
How to verify? The Wrong Way
• Manually with Charles?
• Automatically Monitor network traffic and
analyze it on the fly?
• Query the server to check if event was sent as
expected?
5
How to verify? The Right Way
• Change the tested application (Wix Editor) code and “implement” bi
event method for automation needs
• Provide clear descriptive java framework to verify bi events (based
on the js implementation)
• Create events scheme automatically (not hard coded) – offline
process
6
How to verify?
if (isInTestingMode()) {
editor.biEventHandler = onBiEvent;
}
• Override client’s JS method responsible for sending BI events
7
How to verify?
function onBiEvent(e) {
window.bi.add(e);
}
• Override client’s JS method responsible for sending BI events
8
How to verify?
• Override client’s JS method responsible for sending BI events
• Helper class: bi.js
...
return {
getAll: getAll,
getById: getById,
getSize: getSize,
add: add,
clear: clear
};
9
How to verify?
• Java Framework
• Helper class: BiEvents.java
• Implementation: execute script (window.bi)
interface BiEvents {
List<BiEvent> getAll();
Optional<BiEvent> getEventById(int id);
int getSize();
void clear();
}
10
How to verify?
• Java Framework
• Helper class: BiVerifier.java
BiVerifier eventWasSent(int eventId) {
// Verify: biEvents.getEventById(eventId).isPresent()
...
}
11
How to verify?
• Java Framework
• We want:
@ExpectBiEvent(id = {17, 5000})
@Test
public void testSomething() {
…
}
12
How to verify?
• Java Framework
• New annotation: ExpectBiEvent
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@interface ExpectBiEvent {
int[] eventIds();
}
13
How to verify?
• Java Framework
• We need to verify events were sent – at the end of the test
14
How to verify?
• Java Framework
• Reminder -Test Observer
interface TestObserver {
…
default void ending() { }
…
}
15
How to verify?
• Java Framework
• Helper class: BiEventObserver.java
private Optional<T extends Annotation> getAnnotation(Class<T> type)
@Override
public void ending() {
getAnnotation(ExpectBiEvent.class)
.map(ExpectBiEvent::eventIds)
.map(Ints::asList)
.ifPresent(ids -> ids.forEach(biVerifier::eventWasSent));
}
16
How to verify?
• Event Scheme Creation
• Generate event schemes automatically
• Save generated schemes as resource files
• Validate as part of the verification process
17
How to verify?
• Java Framework
• Helper class: BiVerifier.java
BiVerifier eventWasSent(int eventId) {
Optional<BiEvent> biEvent = biEvents.getEventById(eventId);
// Verify: biEvent.isPresent()
biEvent.ifPresent(this::schemeIsValid);
…
}
18
How to verify?
• Java Framework
• Helper class: BiVerifier.java
BiVerifier schemeIsValid(BiEvent biEvent) {
// expectedScheme = loadBiEventScheme(biEvent.id());
// actualScheme = biEvent.scheme();
// Verify: actual vs expected
…
}
19
Thank you!
Questions?

More Related Content

What's hot

jQuery and AJAX with Rails
jQuery and AJAX with RailsjQuery and AJAX with Rails
jQuery and AJAX with Rails
Alan Hecht
 
Flux - new/old approach to building frontend
Flux - new/old approach to building frontendFlux - new/old approach to building frontend
Flux - new/old approach to building frontend
Bartek Witczak
 
Google App Engine Developer - Day2
Google App Engine Developer - Day2Google App Engine Developer - Day2
Google App Engine Developer - Day2
Simon Su
 
Grails transactions
Grails   transactionsGrails   transactions
Grails transactions
Husain Dalal
 
Intro to ReactJS
Intro to ReactJSIntro to ReactJS
Intro to ReactJS
Harvard Web Working Group
 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
kiranabburi
 
jQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends ForeverjQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends Forever
stephskardal
 
E script-Examples
E script-ExamplesE script-Examples
E script-Examples
maitvam
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Dan Wahlin
 
Automated Testing ADF with Selenium
Automated Testing ADF with SeleniumAutomated Testing ADF with Selenium
Automated Testing ADF with Selenium
Wilfred van der Deijl
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
Academy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & ToolingAcademy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & Tooling
Binary Studio
 
Advance java session 8
Advance java session 8Advance java session 8
Advance java session 8
Smita B Kumar
 
Utilising the data attribute
Utilising the data attributeUtilising the data attribute
Utilising the data attribute
Richard Martens
 
React js
React jsReact js
Using redux
Using reduxUsing redux
Using redux
Jonas Ohlsson Aden
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobX
Darko Kukovec
 
Why ruby on rails
Why ruby on railsWhy ruby on rails
Why ruby on rails
Boris Dinkevich
 
Marketing Automation with dotCMS
Marketing Automation with dotCMSMarketing Automation with dotCMS
Marketing Automation with dotCMS
Jason Smith
 

What's hot (20)

jQuery and AJAX with Rails
jQuery and AJAX with RailsjQuery and AJAX with Rails
jQuery and AJAX with Rails
 
Flux - new/old approach to building frontend
Flux - new/old approach to building frontendFlux - new/old approach to building frontend
Flux - new/old approach to building frontend
 
Google App Engine Developer - Day2
Google App Engine Developer - Day2Google App Engine Developer - Day2
Google App Engine Developer - Day2
 
Grails transactions
Grails   transactionsGrails   transactions
Grails transactions
 
Intro to ReactJS
Intro to ReactJSIntro to ReactJS
Intro to ReactJS
 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
 
jQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends ForeverjQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends Forever
 
E script-Examples
E script-ExamplesE script-Examples
E script-Examples
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
 
Automated Testing ADF with Selenium
Automated Testing ADF with SeleniumAutomated Testing ADF with Selenium
Automated Testing ADF with Selenium
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
 
Academy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & ToolingAcademy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & Tooling
 
Advance java session 8
Advance java session 8Advance java session 8
Advance java session 8
 
Utilising the data attribute
Utilising the data attributeUtilising the data attribute
Utilising the data attribute
 
React js
React jsReact js
React js
 
jQuery On Rails
jQuery On RailsjQuery On Rails
jQuery On Rails
 
Using redux
Using reduxUsing redux
Using redux
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobX
 
Why ruby on rails
Why ruby on railsWhy ruby on rails
Why ruby on rails
 
Marketing Automation with dotCMS
Marketing Automation with dotCMSMarketing Automation with dotCMS
Marketing Automation with dotCMS
 

Similar to Wix Automation - DIY - Testing BI Events

MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB
 
Bdd with Cucumber and Mocha
Bdd with Cucumber and MochaBdd with Cucumber and Mocha
Bdd with Cucumber and Mocha
Atish Narlawar
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event Handlers
NCCOMMS
 
SpringOne 2GX 2013 - Spring Testing
SpringOne 2GX 2013 - Spring TestingSpringOne 2GX 2013 - Spring Testing
SpringOne 2GX 2013 - Spring Testing
Mattias Severson
 
CommercialSystemsBahman.ppt
CommercialSystemsBahman.pptCommercialSystemsBahman.ppt
CommercialSystemsBahman.ppt
KalsoomTahir2
 
Extending Power BI With Your Own Custom Visual
Extending Power BI With Your Own Custom VisualExtending Power BI With Your Own Custom Visual
Extending Power BI With Your Own Custom Visual
Jan Pieter Posthuma
 
Getting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentGetting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online development
Jeremy Thake
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design Patterns
PawanMM
 
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Sittiphol Phanvilai
 
Bridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous DeliveryBridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous Delivery
masoodjan
 
Narender Soni Resume - Updated
Narender Soni Resume - UpdatedNarender Soni Resume - Updated
Narender Soni Resume - UpdatedNarender Soni
 
CV_LamHoangQuocViet
CV_LamHoangQuocVietCV_LamHoangQuocViet
CV_LamHoangQuocVietVi?t L
 
An api is not "yet another feature"
An api is not "yet another feature"An api is not "yet another feature"
An api is not "yet another feature"
Shay Weiner
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum
 
Using Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development CycleUsing Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development Cycleseleniumconf
 
Itb 2021 - Bulding Quick APIs by Gavin Pickin
Itb 2021 - Bulding Quick APIs by Gavin PickinItb 2021 - Bulding Quick APIs by Gavin Pickin
Itb 2021 - Bulding Quick APIs by Gavin Pickin
Gavin Pickin
 
Alfresco Devcon 2010: A new kind of BPM with Activiti
Alfresco Devcon 2010: A new kind of BPM with ActivitiAlfresco Devcon 2010: A new kind of BPM with Activiti
Alfresco Devcon 2010: A new kind of BPM with ActivitiJoram Barrez
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testingdrewz lin
 
LeanIX Architecture Gathering 2018
LeanIX Architecture Gathering 2018LeanIX Architecture Gathering 2018
LeanIX Architecture Gathering 2018
LeanIX GmbH
 

Similar to Wix Automation - DIY - Testing BI Events (20)

MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
 
Bdd with Cucumber and Mocha
Bdd with Cucumber and MochaBdd with Cucumber and Mocha
Bdd with Cucumber and Mocha
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event Handlers
 
SpringOne 2GX 2013 - Spring Testing
SpringOne 2GX 2013 - Spring TestingSpringOne 2GX 2013 - Spring Testing
SpringOne 2GX 2013 - Spring Testing
 
CommercialSystemsBahman.ppt
CommercialSystemsBahman.pptCommercialSystemsBahman.ppt
CommercialSystemsBahman.ppt
 
Extending Power BI With Your Own Custom Visual
Extending Power BI With Your Own Custom VisualExtending Power BI With Your Own Custom Visual
Extending Power BI With Your Own Custom Visual
 
Getting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentGetting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online development
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design Patterns
 
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]
 
Bridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous DeliveryBridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous Delivery
 
Narender Soni Resume - Updated
Narender Soni Resume - UpdatedNarender Soni Resume - Updated
Narender Soni Resume - Updated
 
CV_LamHoangQuocViet
CV_LamHoangQuocVietCV_LamHoangQuocViet
CV_LamHoangQuocViet
 
An api is not "yet another feature"
An api is not "yet another feature"An api is not "yet another feature"
An api is not "yet another feature"
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
 
Using Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development CycleUsing Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development Cycle
 
KhajavaliShaik
KhajavaliShaikKhajavaliShaik
KhajavaliShaik
 
Itb 2021 - Bulding Quick APIs by Gavin Pickin
Itb 2021 - Bulding Quick APIs by Gavin PickinItb 2021 - Bulding Quick APIs by Gavin Pickin
Itb 2021 - Bulding Quick APIs by Gavin Pickin
 
Alfresco Devcon 2010: A new kind of BPM with Activiti
Alfresco Devcon 2010: A new kind of BPM with ActivitiAlfresco Devcon 2010: A new kind of BPM with Activiti
Alfresco Devcon 2010: A new kind of BPM with Activiti
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testing
 
LeanIX Architecture Gathering 2018
LeanIX Architecture Gathering 2018LeanIX Architecture Gathering 2018
LeanIX Architecture Gathering 2018
 

More from Efrat Attas

Wix Engineering - How We Automated GitHub Services
Wix Engineering - How We Automated GitHub ServicesWix Engineering - How We Automated GitHub Services
Wix Engineering - How We Automated GitHub Services
Efrat Attas
 
Wix Automation - Test State Pattern - 11.9.16
Wix Automation - Test State Pattern - 11.9.16Wix Automation - Test State Pattern - 11.9.16
Wix Automation - Test State Pattern - 11.9.16
Efrat Attas
 
Wix Automation - The False Positive Paradox
Wix Automation - The False Positive ParadoxWix Automation - The False Positive Paradox
Wix Automation - The False Positive Paradox
Efrat Attas
 
Wix Automation - It's That Easy!
Wix Automation - It's That Easy!Wix Automation - It's That Easy!
Wix Automation - It's That Easy!
Efrat Attas
 
Wix Automation - Automation Manager
Wix Automation - Automation ManagerWix Automation - Automation Manager
Wix Automation - Automation Manager
Efrat Attas
 
Wix Automation Infrastructure
Wix Automation Infrastructure Wix Automation Infrastructure
Wix Automation Infrastructure
Efrat Attas
 

More from Efrat Attas (6)

Wix Engineering - How We Automated GitHub Services
Wix Engineering - How We Automated GitHub ServicesWix Engineering - How We Automated GitHub Services
Wix Engineering - How We Automated GitHub Services
 
Wix Automation - Test State Pattern - 11.9.16
Wix Automation - Test State Pattern - 11.9.16Wix Automation - Test State Pattern - 11.9.16
Wix Automation - Test State Pattern - 11.9.16
 
Wix Automation - The False Positive Paradox
Wix Automation - The False Positive ParadoxWix Automation - The False Positive Paradox
Wix Automation - The False Positive Paradox
 
Wix Automation - It's That Easy!
Wix Automation - It's That Easy!Wix Automation - It's That Easy!
Wix Automation - It's That Easy!
 
Wix Automation - Automation Manager
Wix Automation - Automation ManagerWix Automation - Automation Manager
Wix Automation - Automation Manager
 
Wix Automation Infrastructure
Wix Automation Infrastructure Wix Automation Infrastructure
Wix Automation Infrastructure
 

Recently uploaded

Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
abdulrafaychaudhry
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 

Recently uploaded (20)

Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 

Wix Automation - DIY - Testing BI Events

  • 1. 1 Wix Automation Itay Shmool & Roi Ashkenazi DIY -Testing BI Events
  • 2. 2 Introduction & key factors • Automation developers can change the tested application itself for the automation needs • Programming language is not a barrier (JS in our example) - knowledge and deep understating of the tested application code • Don’t wait for developers to do it for you – DIY
  • 3. 3 BI Events Testing • BI – Business Intelligence • Monitoring behavior of applications • Statistical analysis
  • 4. 4 How to verify? The Wrong Way • Manually with Charles? • Automatically Monitor network traffic and analyze it on the fly? • Query the server to check if event was sent as expected?
  • 5. 5 How to verify? The Right Way • Change the tested application (Wix Editor) code and “implement” bi event method for automation needs • Provide clear descriptive java framework to verify bi events (based on the js implementation) • Create events scheme automatically (not hard coded) – offline process
  • 6. 6 How to verify? if (isInTestingMode()) { editor.biEventHandler = onBiEvent; } • Override client’s JS method responsible for sending BI events
  • 7. 7 How to verify? function onBiEvent(e) { window.bi.add(e); } • Override client’s JS method responsible for sending BI events
  • 8. 8 How to verify? • Override client’s JS method responsible for sending BI events • Helper class: bi.js ... return { getAll: getAll, getById: getById, getSize: getSize, add: add, clear: clear };
  • 9. 9 How to verify? • Java Framework • Helper class: BiEvents.java • Implementation: execute script (window.bi) interface BiEvents { List<BiEvent> getAll(); Optional<BiEvent> getEventById(int id); int getSize(); void clear(); }
  • 10. 10 How to verify? • Java Framework • Helper class: BiVerifier.java BiVerifier eventWasSent(int eventId) { // Verify: biEvents.getEventById(eventId).isPresent() ... }
  • 11. 11 How to verify? • Java Framework • We want: @ExpectBiEvent(id = {17, 5000}) @Test public void testSomething() { … }
  • 12. 12 How to verify? • Java Framework • New annotation: ExpectBiEvent @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @interface ExpectBiEvent { int[] eventIds(); }
  • 13. 13 How to verify? • Java Framework • We need to verify events were sent – at the end of the test
  • 14. 14 How to verify? • Java Framework • Reminder -Test Observer interface TestObserver { … default void ending() { } … }
  • 15. 15 How to verify? • Java Framework • Helper class: BiEventObserver.java private Optional<T extends Annotation> getAnnotation(Class<T> type) @Override public void ending() { getAnnotation(ExpectBiEvent.class) .map(ExpectBiEvent::eventIds) .map(Ints::asList) .ifPresent(ids -> ids.forEach(biVerifier::eventWasSent)); }
  • 16. 16 How to verify? • Event Scheme Creation • Generate event schemes automatically • Save generated schemes as resource files • Validate as part of the verification process
  • 17. 17 How to verify? • Java Framework • Helper class: BiVerifier.java BiVerifier eventWasSent(int eventId) { Optional<BiEvent> biEvent = biEvents.getEventById(eventId); // Verify: biEvent.isPresent() biEvent.ifPresent(this::schemeIsValid); … }
  • 18. 18 How to verify? • Java Framework • Helper class: BiVerifier.java BiVerifier schemeIsValid(BiEvent biEvent) { // expectedScheme = loadBiEventScheme(biEvent.id()); // actualScheme = biEvent.scheme(); // Verify: actual vs expected … }