Test Automation

2 minutes read

TestCafe is a Node.js tool to automate end-to-end web testing.

testcafe

What are End to End tests and why are they important?

End to End tests cover real journeys that your customers do, they are slower to execute but can be much more valuable comparing to unit and integration tests.

E2E testing cons:

  • slow and non-consistently passing tests
  • long configuration time
  • too long execution time – much longer than unit tests
  • debugging time is too high

What is TestCafe? History of TestCafe and how does it work?

TestCafe is a Node.js tool to automate end-to-end web testing and functional testing.

TestCafe uses a URL-rewriting proxy called Hammerhead that emulates commands using the DOM API and injects JavaScript into the browser.

TestCafe supports multiple browsers without any browser drivers.

It runs every single test in its own isolated test environment to simulate new sessions.

Each test has finished being executed, it will lose the state (cookies, local storage etc) of the page and start from the beginning again.

Main TestCafe features:

  • Cross-browser testing
  • Open source
  • Easy setup/installation
  • UI End to End Tests
  • Builtin waits
  • Retry assertions
  • Uses standard CSS selectors to locate elements
  • Live Testing with TestCafe Live
  • Remote browser/mobile testing: run tests in any browser (including mobile devices and cloud services)
  • No complex configuration required
  • Can control the speed at which tests are run
  • Concurrency: run multiple tests with same or different browsers at the same time
  • CI/CD integration
  • Screenshots testing
  • Supports TypeScript

Example of Test in TestCafe:


import { Selector } from 'testcafe';

fixture `Getting Started`
    .page `http://devexpress.github.io/testcafe/example`;

test('My first test', async t => {
    // Test code
});

More details on How to Build an End to End Software Testing Framework with TestCafe in our Coursinator course.

More details on How to Build an End to End Software Testing Framework with TestCafe in our Coursinator course.

Test Automation

1 minute read

KissFront uses Google Lighthouse as a Service for continuous modern performance audits.

KissFront’s Chrome Extension for Google Lighthouse is live now. This will enable easier view of the modern performance metrics like Performance Score, First Meaningful Paint, First Contentful Paint, Speed Index and others.

Monitor your website

Your website gets monitored every hour, and you can use this new extension to monitor your website performance, and understand how is your website’s performance changing over time..

More details on how easily is to run a test with KissFront and Google Lighthouse.

Get Started Now

Page Load Time Performance Testing Website Speed Testing

2 minutes readKissFront is a web performance monitoring tool running Lighthouse continuously or on-demand (using Lighthouse as a service) to monitor your website performance and get insights on speed with modern performance metrics.

Lighthouse is an open-source automated tool for analysing and improving the quality of web pages with audits for performance, accessibility, progressive web apps, SEO and best practices.

KissFront.com uses Lighthouse as a Service to provide regression testing for developers and product people

Each time Lighthouse audit generates a comprehensive report that gives information on all of the tests that passed in addition to the ones that failed. Also it includes the ability to test progressive web applications for compliance with standards and best practices.

lighthouse metrics results

KissFront uses Lighthouse audits and it provides five categories of feedback, ranking from zero to 100. Lighthouse Audit references: Performance, Progressive Web App, Accessibility, Best Practices, SEO.

  • Performance: Modern metrics on how fast your website loads and how key elements become available to your customers – First Contentful Paint, First Meaningful Paint, Speed Index etc.
  • Progressive Web App: checks your site’s level of completeness, which improves mobile performance and may increase search engine rankings.
  • Accessibility: checks 35 accessibility traits, one of the most important things you can monitor, also you are legally obliged to provide an accessible website.
  • Best Practices: checks the use web development best practices, like HTTP/2.
  • SEO: less thorough than some third-party SEO audit tools, it can still help your business get an idea of how it will perform in search engines.

lighthouse report

Choose the Lighthouse usage

  • Use KissFront for Lighthouse as a service
  • Chrome DevTools
  • Command line (via shell scripts)
  • As Node module npm install -g lighthouse To run an audit: lighthouse To see audit options: lighthouse –help

KissFront.com Helps Improving Your Overall Website Experience. Easily store and share results with your team.

lighthouse multiple runs

KissFront gives you the ability to monitor all the metrics from above over a period of time during deployments and high load. Also gives you the ability to monitor not only your website but you competitors web sites.

Modern Performance Metrics Page Load Time Test Automation

1 minute readTime to First Meaningful Paint (TTFMT) is a modern performance metric introduced by few engineers from Google, and is the time to paint the main content that users are interested in, so the thing the users came here for.

Rendering some background color can be much easier and faster, but that’s definitely not what the users was looking for when they entered your website.

In order to identify the main content of the page, we define these primary elements as Hero Elements, but for now there is not a clear way for us to get paint times of specific elements of the DOM (Document Object Model).

first meaningful paint

No browsers exposes this metric at the moment, but it seems to get big traction. You can inspect the First Contentful Paint (FCP) and First Meaningful Paint (FMP) with KissFront, which allows easy monitoring and modern metrics inspection.

First Meaningful Paint can be also defined as the paint after which the biggest layout change has happened.

Modern Performance Metrics Page Load Time

1 minute readFirst Paint (FP) shows the time it took for something to happen, anything at all, however this can be not so useful, as this first render, may not be very useful for the user, and for the overall experience.

First Paint entry marks the first key moment developers care about in page load – when the browser has started to render the page. More details here https://w3c.github.io/paint-timing/#first-paint

How to improve the First Paint (FP)

One idea is to trim the size of your JavaScript bundles in order to improve the FP, especially for slow networks like 3G or Edge, which are still available in areas with poor connectivity, or on low-end mobile phones.
Have a look which functionality you use from a library, and try to mimic that in a much simpler fashion.

An improvement to First Paint (FP) is the First Contentful Paint (FCP) which helps you understand the time it took to render something useful for the user.

First Paint and First Contentful Paint metrics can be identical on fast websites, but on more complex websites, with various client and server side rendering, the First Contentful Paint would be the best metric to use.

More details on how to improve issues on your website can be found by running tests with KissFront.

Modern Performance Metrics Page Load Time Website Speed Testing

3 minutes readA customer decides if a website is “slow” or “fast” by multiple moments experienced during the load of the website.

Definiton

First Contentful Paint (FCP) is a performance metric which measures the time from navigation to the time when the browser renders the first bit of content from the DOM. It provides feedback that the page is actually loading.

First Contentful Paint entry contains a DOMHighResTimeStamp which highlights the time when the browser first rendered any text/image or SVG, canvas or text with pending webfonts. (it excludes iframes).

first contentful paint

This is the first time users could start consuming page content, and this moment is useful for user experience assessment and quite important cause it marks the moment when a user can consume website’s content – More details here https://w3c.github.io/paint-timing/#first-contentful-paint

 

KissFront monitors websites performance, analyzes & compares it to competitors, collecting modern performance metrics and insights on best practices using Lighthouse.

first contentful paint

First Contentful Paint time still has its drawbacks – the loaded content may not be meaningful for the user that loaded the website.

First Meaningful Paint (FMP) is another performance metric which will be available, where the focus will be on content desired by the user.

First Contentful Paint vs. First Meaningful Paint

First Contentful Paint is usually used as an approximation of the First Meaningful Paint, the downside of this performance metric is that it often catches no very meaningful paints in the web page, like headers, footers, different scrolling or navigation bars, that are non very meaningful in terms of overall loading experience. The user cannot understand much about what the website is about, or cannot see yet the content that he/she was looking for.

Recent studies discovered that half of users are likely to abandon a website load in more than 3 seconds.

Apparently, 1 second delay in response time translated in 7% less conversions.

E-Commerce companies are the ones most affected by loading times, and this can actually mark the difference between losing a potential customer or finishing a sale.

That’s why the most important metrics nowadays are the ones that directly affect your customers, how they perceive your website, their confidence that the whole experience is smooth-less.A fast website does not only refer to the landing page, but you should pay attention the every page that is required as part of a user workflow.

How to Improve First Contentful Paint (FCP)?

  • Change the way your web fonts load – add font-display: swap; to your @font-face rule, will tell the browser to load first the system fonts when the DOM is rendered, and the swap to the custom web fonts you want to use.
  • Optimize images and load them with the expected resolution and in the order your users really need them – resize the images and use the right resolution

This change improves your First Contentful Paint (FCP) and your First Meaningful Paint (FMP), and it’s supported by all major browsers (excluding Internet Explorer and Edge 🙂 )

More details on how to improve issues on your website can be found by running tests with KissFront.

first contentful paint

First Contentful Paint (FCP) and First Meaningful Paint (FMP) are some of these metrics can make your website faster if you pay attention to them and continuously monitor them.

first contentful paint

Test Automation

1 minute readLoad Testing is all about caring for your customers.

Running load tests all year round is a best practice and you should have this idea in mind.

Here are just a few things that can affect your sales, by getting less conversions and increasing the churn rate:

  • New releases containing new code/features with performance issues
  • slow new features
  • buggy code which causes the website, web service to hang
  • freezing screens
  • slow database
  • no CDN for assets
  • non optimised code/HTML/JS/CSS files
  • heavy fonts
  • not used CSS styles and others

SEO is also impacted by slow websites, sites what experience issues when the load is higher that usual.

These are just some of the reasons why it’s a good idea to load test your web services, websites every day/week/month/year and not just at specific times.

With LoadFocus.com there is no need to write any piece of code while configuring your load tests, just a few seconds and you are ready to run load test for your websites.

Here are potential load testing errors and response codes that you may receive while running your load tests.