Marie Drake, Principal Test Automation Engineer
{
"name": "Marie Drake",
"originCountry": "🇵🇭",
"currentCountry": "🇬🇧",
"workRole": "Principal Test Automation Engineer",
"otherRoles": [
"Cypress Ambassador",
"Tech Blogger"
"Co-organizer of Cypress UK Community Group"
"Mum and Woman in Tech"
],
"interestingFact": "I saw the great Stephen Hawking
on a cruise ship"
}
News Corp’s global strategy is to break
down the siloed approach of our companies
to deliver shared services, platforms, tools
and processes to eradicate unnecessary
duplication.
Source: Tech Reset Product Platforms
Delivering Tech expertise outside the core
products creates tension, distraction and a
strain on agreed and existing workloads.
Examples:
• Virgin Radio
• News IQ
• Expert Traveller
Source: Tech Reset Product Platforms
‘The Fabulous Pink Incident’
Fabulous changed their brand colour, Tech estimated the change to take 6 months.
There is no single source of truth for any one atom / component / module to overwrite and inherit.
‘Lower priority’ tasks are too prohibitive to be able to justify and deliver.
Source: Tech Reset Product Platforms
To provide a library of shared reusable components that will serve as building blocks from which title teams and brands across News UK and NewsCorp can reuse.
Test different components easily
Cross browser visual validation is a must
Write visual tests with less maintenance in mind
Deliver a high performing build pipeline
Build times must be less than 10 minutes
Integrate Design Review earlier on the process
Test for Accessibility on both Component and Site level
Catch functional issues earlier on
Have all the tests written before deploying a feature
Visual Testing is an important testing strategy here at News UK but…
Visual Tests are flaky!
checkIfAllLiveblogPostsAreVisible() {
const failedPosts = [];
this.requiredLiveblogPosts.forEach(element => {
browser.scrollElement(element);
if(!browser.isElementVisible(element)) {
failedPosts.push(element);
}
});
return failedPosts.length === 0 ? true
: Error(`List of elements not visible: ${failedPosts}`);
}
if(isBaselineFound) {
runSnapshot();
checkDifferences();
reportTestStatus();
} else {
promoteImageAsBaseline();
}
module.exports = {
appName: 'DS Components',
batchName: 'DS Components',
storybookUrl: 'http://localhost:6006',
browser: [
{deviceName: 'iPhone 5/SE'},
{width: 1024, height: 768, name: 'firefox'},
{width: 1024, height: 768, name: 'ie11'},
{width: 1024, height: 768, name: 'chrome'},
{width: 1024, height: 768, name: 'safari'},
],
concurrency: 100,
viewportSize: {width: 1027, height: 768},
waitBeforeScreenshot: 5000,
};
"dev:storybook": "start-storybook --ci -p 6006 -s ./fonts",
"eyes:storybook": "eyes-storybook --conf applitools.components.config.js",
"test:visual:comps:ci": "start-server-and-test
dev:storybook http://localhost:6006 eyes:storybook"
npm i --D @applitools/eyes-storybook
module.exports = {
appName: 'DS Site',
batchName: 'DS Site',
browser: [
{deviceName: 'iPhone 5/SE'},
{deviceName: 'iPad'},
{width: 1024, height: 768, name: 'firefox'},
{width: 2880, height: 1800, name: 'chrome'},
],
waitBeforeScreenshot: 5000,
concurrency: 20,
};
"serve:docs": "http-server public -p 8081",
"e2e:visual:docs:ci": "start-server-and-test serve:docs http://localhost:8081
'TZ=UTC cypress run
--config-file cypress/config/cypress.docs.visual.json'"
npm i --D @applitools/eyes-cypress
npx eyes-setup
const routes = {
articleByline: '/components/article-byline',
audioPlayer: '/components/audio-player',
dateLine: '/components/date-line',
icons: '/foundations/icons',
radioPlayer: '/components/radio-player',
shareBar: '/components/share-bar',
spacing: '/foundations/spacing',
typography: '/foundations/typography',
welcome: '/index',
};
Object.entries(routes).forEach(route => {
const [pageName, path] = route;
describe(`${pageName} page`, () => {
it(`should pass visual regression test on ${pageName}`, () => {
cy.eyesOpen();
cy.visit(path);
if (!['spacing', 'welcome'].includes(pageName)) {
cy.get('[data-testid="sample-code"]')
.first()
.scrollIntoView({
easing: 'linear',
});
}
cy.eyesCheckWindow(`${pageName} page`);
cy.eyesClose();
});
});
});
track loading
a11yComponentRules.forEach(component => {
describe(`${component.name} component`, () => {
it('should pass basic a11y test', () => {
cy.visit(`?name=${component.name}`);
cy.injectAxe();
if (component.disabledRules === undefined) {
cy.checkA11yWithDefaultRules();
} else {
cy.checkA11yWithCustomRule(component.disabledRules);
}
});
});
});
npm i --D cypress-axe
// support/index.js
import 'cypress-axe';
👏🏼 Fulfills our testing requirements
👏🏼 Simplifies our visual testing process
👏🏼 760 component tests less than 5 mins
👏🏼 High performing build pipeline
👏🏼 Test maintenance simpler
👏🏼 Applitools support
👏🏼 Focus on fine visual details
👏🏼 Great level of test coverage
👏🏼 When reviewing visual changes, Applitools dashboard is very intuitive once you grasp the basics.
👏🏼 AI functionality is a time saver
🤔 Applitools UI could be more intuitive especially for new users
🤔 Ability to set Baseline images from actual UI design (Sketch/Figma/Abstract plugin?)
🤔 More visual love on Documentation Site (License restrictions)
Marie Drake, Principal Test Automation Engineer