SlideShare a Scribd company logo
Elio Struyf
Architect @ Valo – MVP
November 15th, 2018
Implementing automated UI
testing for SharePoint solutions
Testing your code
Code analysis
• Manual
• JSLint / TSLint → Define code/analysis rules
• Static analysis like SonarQube
Unit Tests
Visual UI Tests
Automated UI Tests
• Unit tests validate your code, UI tests validate that it actually works
• Test your solution functionality
• Test out time consuming actions
• Check if your solution gets rendered correctly
• Use tools like:
• Coded UI Tests in Visual Studio
• Selenium
• Robot Framework
• …
Puppeteer
• High-level API to control Chrome / Chromium
• Runs Chrome in headless mode (can be non-headless)
• Full access over the DevTools Protocol
• Can automate all manual browsers steps
• Navigating
• Taking screenshots / generating a PDF
• Clicking on links / buttons / menu / …
• Documentation: https://github.com/GoogleChrome/puppeteer
• Install: npm i puppeteer
Puppeteer sample
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://www.eliostruyf.com’);
await page.screenshot({path: 'example.png', fullPage: true});
await browser.close();
})();
Make tests easier with a recorder:
https://github.com/checkly/puppeteer-recorder
Authenticate against
SharePoint
Authenticate against SharePoint
• Go through the whole authentication process
• Use a library like: node-sp-auth
• https://www.npmjs.com/package/node-sp-auth
import * as spauth from 'node-sp-auth';
const data = await spauth.getAuth(pageUrl, {
username: username,
password: password
});
Finding differences in
your pictures
What changed
between today
and yesterday
Pixel matching
https://github.com/mapbox/pixelmatch
pixelmatch(img1.data, img2.data, diff.data, img1.width, img1.height, { threshold: 0.1 });
Jest testing framework
• Zero configuration testing platform
• Testing JavaScript based applications
• Created by Facebook
• Install: npm install jest @types/jest -D
Combining Puppeteer and Jest
test('Should load the page', async (done) => {
if (page) {
await page.goto(configObj.pageUrl, {
waitUntil: 'networkidle0’
});
expect(page).not.toBeNull();
expect(await page.title()).not.toBeNull();
expect(await page.title()).toBe("Automated UI Tests - Home");
done();
}
}, 30000);
Combining Puppeteer and Jest
/**
* Start of the other page tests
*/
test('Check if caption element is present in the web part', async (done) => {
const elm = await page.$('.caption’);
expect(elm).not.toBeNull();
done();
}, 5000);
Wait!
It’s not so easy!
.caption !== .caption_8f70350b
Solution: work with data-* attributes
<div className={styles.caption} data-ui-test-id="caption">
<p data-ui-test-id="caption-title">
<b>{item.title}</b>
</p>
<p data-ui-test-id="caption-description">
<i>{item.description}</i>
</p>
</div>
Simple element retrieval
/**
* Start of the other page tests
*/
test('Check if caption element is present in the web part', async (done) => {
const caption = await page.$('div[data-ui-test-id="caption"]’);
expect(caption).not.toBeNull();
done();
}, 5000);
Questions?
Office Servers & Services MVP
Azure / Office 365 / SharePoint
@eliostruyf
www.eliostruyf.com
info@estruyf.be
Elio Struyf
Architect
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio Struyf

More Related Content

What's hot

Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino Designer
Paul Withers
 
Serverless in Azure with Functions
Serverless in Azure with FunctionsServerless in Azure with Functions
Serverless in Azure with Functions
Christos Matskas
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris O'Brien
 
Azure Web Jobs
Azure Web JobsAzure Web Jobs
Azure Web Jobs
BizTalk360
 
ASP.NET Core Unit Testing
ASP.NET Core Unit TestingASP.NET Core Unit Testing
ASP.NET Core Unit Testing
Shahed Chowdhuri
 
Going Serverless with Azure Functions
Going Serverless with Azure FunctionsGoing Serverless with Azure Functions
Going Serverless with Azure Functions
Christos Matskas
 
SharePoint PowerShell for the Admin and Developer - A Venn Diagram Experience
SharePoint PowerShell for the Admin and Developer - A Venn Diagram ExperienceSharePoint PowerShell for the Admin and Developer - A Venn Diagram Experience
SharePoint PowerShell for the Admin and Developer - A Venn Diagram Experience
Ricardo Wilkins
 
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHEREECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
European Collaboration Summit
 
ASP.NET Core 1.0 Overview
ASP.NET Core 1.0 OverviewASP.NET Core 1.0 Overview
ASP.NET Core 1.0 Overview
Shahed Chowdhuri
 
Application Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 developmentApplication Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 development
Chris O'Brien
 
Logic Apps – Deployments
Logic Apps – DeploymentsLogic Apps – Deployments
Logic Apps – Deployments
BizTalk360
 
SPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint DevelopersSPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint Developers
NCCOMMS
 
Building reliable web applications using Cypress
Building reliable web applications using CypressBuilding reliable web applications using Cypress
Building reliable web applications using Cypress
Maurice De Beijer [MVP]
 
Create SASSy web parts in SPFx
Create SASSy web parts in SPFxCreate SASSy web parts in SPFx
Create SASSy web parts in SPFx
Stefan Bauer
 
D2 - Automate Custom Solutions Deployment on Office 365 and Azure - Paolo Pia...
D2 - Automate Custom Solutions Deployment on Office 365 and Azure - Paolo Pia...D2 - Automate Custom Solutions Deployment on Office 365 and Azure - Paolo Pia...
D2 - Automate Custom Solutions Deployment on Office 365 and Azure - Paolo Pia...
SPS Paris
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
Bob German
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)
Visug
 
Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)
Vincent Biret
 
Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)
Vincent Biret
 
Building solutions with the SharePoint Framework - introduction
Building solutions with the SharePoint Framework - introductionBuilding solutions with the SharePoint Framework - introduction
Building solutions with the SharePoint Framework - introduction
Waldek Mastykarz
 

What's hot (20)

Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino Designer
 
Serverless in Azure with Functions
Serverless in Azure with FunctionsServerless in Azure with Functions
Serverless in Azure with Functions
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
 
Azure Web Jobs
Azure Web JobsAzure Web Jobs
Azure Web Jobs
 
ASP.NET Core Unit Testing
ASP.NET Core Unit TestingASP.NET Core Unit Testing
ASP.NET Core Unit Testing
 
Going Serverless with Azure Functions
Going Serverless with Azure FunctionsGoing Serverless with Azure Functions
Going Serverless with Azure Functions
 
SharePoint PowerShell for the Admin and Developer - A Venn Diagram Experience
SharePoint PowerShell for the Admin and Developer - A Venn Diagram ExperienceSharePoint PowerShell for the Admin and Developer - A Venn Diagram Experience
SharePoint PowerShell for the Admin and Developer - A Venn Diagram Experience
 
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHEREECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
 
ASP.NET Core 1.0 Overview
ASP.NET Core 1.0 OverviewASP.NET Core 1.0 Overview
ASP.NET Core 1.0 Overview
 
Application Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 developmentApplication Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 development
 
Logic Apps – Deployments
Logic Apps – DeploymentsLogic Apps – Deployments
Logic Apps – Deployments
 
SPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint DevelopersSPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint Developers
 
Building reliable web applications using Cypress
Building reliable web applications using CypressBuilding reliable web applications using Cypress
Building reliable web applications using Cypress
 
Create SASSy web parts in SPFx
Create SASSy web parts in SPFxCreate SASSy web parts in SPFx
Create SASSy web parts in SPFx
 
D2 - Automate Custom Solutions Deployment on Office 365 and Azure - Paolo Pia...
D2 - Automate Custom Solutions Deployment on Office 365 and Azure - Paolo Pia...D2 - Automate Custom Solutions Deployment on Office 365 and Azure - Paolo Pia...
D2 - Automate Custom Solutions Deployment on Office 365 and Azure - Paolo Pia...
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)
 
Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)
 
Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)
 
Building solutions with the SharePoint Framework - introduction
Building solutions with the SharePoint Framework - introductionBuilding solutions with the SharePoint Framework - introduction
Building solutions with the SharePoint Framework - introduction
 

Similar to O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio Struyf

[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions
European Collaboration Summit
 
Testing mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkTesting mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP framework
SusannSgorzaly
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
Mats Bryntse
 
Cypress.pptx
Cypress.pptxCypress.pptx
Cypress.pptx
Arshad QA
 
Asp.net core 1.0 (Peter Himschoot)
Asp.net core 1.0 (Peter Himschoot)Asp.net core 1.0 (Peter Himschoot)
Asp.net core 1.0 (Peter Himschoot)
Visug
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
Troy Miles
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015
Andrew Eisenberg
 
Automation of online games
Automation of online gamesAutomation of online games
Automation of online games
Robert Grzeskowiak
 
Django
DjangoDjango
The MEAN stack
The MEAN stack The MEAN stack
The MEAN stack
Nattaya Mairittha
 
Jenkins CI for MacDevOps
Jenkins CI for MacDevOpsJenkins CI for MacDevOps
Jenkins CI for MacDevOps
Timothy Sutton
 
Play Framework workshop: full stack java web app
Play Framework workshop: full stack java web appPlay Framework workshop: full stack java web app
Play Framework workshop: full stack java web app
Andrew Skiba
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
Luke Maung
 
vodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev toolsvodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev tools
vodQA
 
Using protractor to build automated ui tests
Using protractor to build automated ui testsUsing protractor to build automated ui tests
Using protractor to build automated ui tests
🌱 Dale Spoonemore
 
VorlonJS
VorlonJSVorlonJS
VorlonJS
FabrĂ­cio Catae
 
Play framework
Play frameworkPlay framework
Play frameworksambaochung
 
JavaScript on the Desktop
JavaScript on the DesktopJavaScript on the Desktop
JavaScript on the Desktop
Domenic Denicola
 
Developing VR Experiences with Unity
Developing VR Experiences with UnityDeveloping VR Experiences with Unity
Developing VR Experiences with Unity
Mark Billinghurst
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
Javan Rasokat
 

Similar to O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio Struyf (20)

[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions
 
Testing mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkTesting mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP framework
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
 
Cypress.pptx
Cypress.pptxCypress.pptx
Cypress.pptx
 
Asp.net core 1.0 (Peter Himschoot)
Asp.net core 1.0 (Peter Himschoot)Asp.net core 1.0 (Peter Himschoot)
Asp.net core 1.0 (Peter Himschoot)
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015
 
Automation of online games
Automation of online gamesAutomation of online games
Automation of online games
 
Django
DjangoDjango
Django
 
The MEAN stack
The MEAN stack The MEAN stack
The MEAN stack
 
Jenkins CI for MacDevOps
Jenkins CI for MacDevOpsJenkins CI for MacDevOps
Jenkins CI for MacDevOps
 
Play Framework workshop: full stack java web app
Play Framework workshop: full stack java web appPlay Framework workshop: full stack java web app
Play Framework workshop: full stack java web app
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
vodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev toolsvodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev tools
 
Using protractor to build automated ui tests
Using protractor to build automated ui testsUsing protractor to build automated ui tests
Using protractor to build automated ui tests
 
VorlonJS
VorlonJSVorlonJS
VorlonJS
 
Play framework
Play frameworkPlay framework
Play framework
 
JavaScript on the Desktop
JavaScript on the DesktopJavaScript on the Desktop
JavaScript on the Desktop
 
Developing VR Experiences with Unity
Developing VR Experiences with UnityDeveloping VR Experiences with Unity
Developing VR Experiences with Unity
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 

More from NCCOMMS

O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
NCCOMMS
 
O365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
O365Con19 - Model-driven Apps or Canvas Apps? - Rick BakkerO365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
O365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
NCCOMMS
 
O365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
O365Con19 - Office 365 Groups Surviving the Real World - Jasper OosterveldO365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
O365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
NCCOMMS
 
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis JugoO365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
NCCOMMS
 
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis JugoO365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
NCCOMMS
 
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul HuntO365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
NCCOMMS
 
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
NCCOMMS
 
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
NCCOMMS
 
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
NCCOMMS
 
O365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
O365Con19 - Lets Get Started with Azure Container Instances - Jussi RoineO365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
O365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
NCCOMMS
 
O365Con19 - Azure Blackbelt - Jussi Roine
O365Con19 - Azure Blackbelt - Jussi RoineO365Con19 - Azure Blackbelt - Jussi Roine
O365Con19 - Azure Blackbelt - Jussi Roine
NCCOMMS
 
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna LinsO365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
NCCOMMS
 
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna LinsO365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
NCCOMMS
 
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
NCCOMMS
 
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio StruyfO365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
NCCOMMS
 
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
NCCOMMS
 
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de JagerO365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
NCCOMMS
 
O365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
O365Con19 - Kaizala a Dive Into the Unknown - Rick van RousseltO365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
O365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
NCCOMMS
 
O365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
O365Con19 - How to Inspire Users to Unstick from Email - Luise FreeseO365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
O365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
NCCOMMS
 
O365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
O365Con19 - O365 Identity Management and The Golden Config - Chris GoosenO365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
O365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
NCCOMMS
 

More from NCCOMMS (20)

O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
 
O365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
O365Con19 - Model-driven Apps or Canvas Apps? - Rick BakkerO365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
O365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
 
O365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
O365Con19 - Office 365 Groups Surviving the Real World - Jasper OosterveldO365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
O365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
 
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis JugoO365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
 
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis JugoO365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
 
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul HuntO365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
 
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
 
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
 
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
 
O365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
O365Con19 - Lets Get Started with Azure Container Instances - Jussi RoineO365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
O365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
 
O365Con19 - Azure Blackbelt - Jussi Roine
O365Con19 - Azure Blackbelt - Jussi RoineO365Con19 - Azure Blackbelt - Jussi Roine
O365Con19 - Azure Blackbelt - Jussi Roine
 
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna LinsO365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
 
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna LinsO365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
 
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
 
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio StruyfO365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
 
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
 
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de JagerO365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
 
O365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
O365Con19 - Kaizala a Dive Into the Unknown - Rick van RousseltO365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
O365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
 
O365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
O365Con19 - How to Inspire Users to Unstick from Email - Luise FreeseO365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
O365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
 
O365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
O365Con19 - O365 Identity Management and The Golden Config - Chris GoosenO365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
O365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
 

Recently uploaded

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 

Recently uploaded (20)

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 

O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio Struyf

  • 1. Elio Struyf Architect @ Valo – MVP November 15th, 2018 Implementing automated UI testing for SharePoint solutions
  • 2.
  • 4. Code analysis • Manual • JSLint / TSLint → Define code/analysis rules • Static analysis like SonarQube
  • 7. Automated UI Tests • Unit tests validate your code, UI tests validate that it actually works • Test your solution functionality • Test out time consuming actions • Check if your solution gets rendered correctly • Use tools like: • Coded UI Tests in Visual Studio • Selenium • Robot Framework • …
  • 8.
  • 9. Puppeteer • High-level API to control Chrome / Chromium • Runs Chrome in headless mode (can be non-headless) • Full access over the DevTools Protocol • Can automate all manual browsers steps • Navigating • Taking screenshots / generating a PDF • Clicking on links / buttons / menu / … • Documentation: https://github.com/GoogleChrome/puppeteer • Install: npm i puppeteer
  • 10. Puppeteer sample const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.goto('https://www.eliostruyf.com’); await page.screenshot({path: 'example.png', fullPage: true}); await browser.close(); })();
  • 11. Make tests easier with a recorder: https://github.com/checkly/puppeteer-recorder
  • 13. Authenticate against SharePoint • Go through the whole authentication process • Use a library like: node-sp-auth • https://www.npmjs.com/package/node-sp-auth import * as spauth from 'node-sp-auth'; const data = await spauth.getAuth(pageUrl, { username: username, password: password });
  • 16. Pixel matching https://github.com/mapbox/pixelmatch pixelmatch(img1.data, img2.data, diff.data, img1.width, img1.height, { threshold: 0.1 });
  • 17.
  • 18. Jest testing framework • Zero configuration testing platform • Testing JavaScript based applications • Created by Facebook • Install: npm install jest @types/jest -D
  • 19. Combining Puppeteer and Jest test('Should load the page', async (done) => { if (page) { await page.goto(configObj.pageUrl, { waitUntil: 'networkidle0’ }); expect(page).not.toBeNull(); expect(await page.title()).not.toBeNull(); expect(await page.title()).toBe("Automated UI Tests - Home"); done(); } }, 30000);
  • 20. Combining Puppeteer and Jest /** * Start of the other page tests */ test('Check if caption element is present in the web part', async (done) => { const elm = await page.$('.caption’); expect(elm).not.toBeNull(); done(); }, 5000);
  • 23. Solution: work with data-* attributes
  • 24. <div className={styles.caption} data-ui-test-id="caption"> <p data-ui-test-id="caption-title"> <b>{item.title}</b> </p> <p data-ui-test-id="caption-description"> <i>{item.description}</i> </p> </div>
  • 25.
  • 26. Simple element retrieval /** * Start of the other page tests */ test('Check if caption element is present in the web part', async (done) => { const caption = await page.$('div[data-ui-test-id="caption"]’); expect(caption).not.toBeNull(); done(); }, 5000);
  • 27.
  • 29. Office Servers & Services MVP Azure / Office 365 / SharePoint @eliostruyf www.eliostruyf.com info@estruyf.be Elio Struyf Architect