Testing Frameworks, Mobile Frameworks, and Browsers Love Developers and Testers

Rate this content
Bookmark
Focusing on being where your users are isn't as difficult as you think. A lot of groups out there will tell you that their tool is the best and that even though none of your users use that browser or mobile setup it is fine. In this talk, David will talk about all the differences that come up, why browser vendors are even telling folks not to focus on browser engines or virtual doms, and how the setup of development environments is simple to set up these days.

By ignoring the love that is being pushed to developers and testers through the work being done there can be tests that are passing but your users are failing to use your application! Don't worry, David will have the real world examples to show you how broken things are :)

This talk has been presented at TestJS Summit 2023, check out the latest edition of this JavaScript Conference.

FAQ

The speaker is David, who has extensive experience in browser automation and has spent nearly a decade working on Firefox.

Testing is hard because the systems being tested are incredibly complex. JavaScript is an asynchronous language, and testing often requires sequential thinking. Additionally, multiple layers, browsers, and web apps add to the complexity.

The testing pyramid is a concept that breaks down testing into different levels, such as unit testing, integration testing, and end-to-end testing. It aims to simplify the testing process by categorizing tests based on their scope and complexity.

Unit tests are small tests that focus on individual components or functions. Integration tests, on the other hand, test the interactions between different components or systems to ensure they work together as expected.

Some tools mentioned for JavaScript testing include Mocker, VTest, Cypress, Playwright, Nightwatch.js, and WebDriver I-O. These tools help simplify the testing process and improve productivity.

Cross-browser testing is important because different browsers, including mobile browsers, can render web pages differently. Testing across multiple browsers ensures that the application works correctly for all users.

Chrome for Testing is a version of Chrome designed specifically for testing purposes. It helps ensure deterministic testing by removing features like auto-updates, making it easier to identify and fix issues.

Headless browsers should be avoided for end-to-end tests because they do not fully replicate the user experience. While useful for local development, they may not catch all the issues that could occur in a real user environment.

The principle of least astonishment, or least surprise, states that software should behave in a way that users intuitively expect. This principle helps improve user experience by making software more predictable and easier to use.

Sharing feature ideas with framework developers is important because it helps improve the tools and frameworks that developers rely on. Open communication ensures that the tools evolve to meet the needs of the community.

David Burns
David Burns
27 min
07 Dec, 2023

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Today's Talk covered various topics including testing frameworks, browsers, and the challenges faced in testing complex systems. The importance of improving testing setup and productivity was highlighted, along with the principle of least surprise and the need for framework upgrades. The Talk also discussed the different browser engines and their unique features, as well as the benefits of sharing ideas and approaches within the software development community. The session concluded with insights on browser testing and the use of tools like Playwright and WebKit.

1. Introduction to Testing Frameworks and Browsers

Short description:

Today, I'm going to talk about testing frameworks, mobile frameworks, browsers, and how the people behind them love developers and testers who use their products.

♪♪♪ Hi, everyone. My name's David. And today I'm going to be talking about testing frameworks, mobile frameworks, browsers, and how each of the people who work on those love developers and testers who use their products. The reason why I know this is, as Nathaniel said, I've been kind of in the industry for a while. I've spent nearly a decade working on Firefox. I've been doing browser automation for nearly two decades. And so every time I see these things and come to these conferences and see what people are doing and showing, all I see is kind of the love that they care and want to improve everything. And I want us to kind of care about it. I want everyone in this room to go, actually, it's nice to see that they care.

2. Challenges in Testing and Simplifying Approaches

Short description:

Testing is hard. The systems we're working against are incredibly complex. We've got browsers, web apps, and multiple layers through the entire system. Numerous people have tried to simplify testing with terms like the testing pyramid, unit testing, and integration testing.

And so we're going to start with something I think is kind of a tree. Testing is hard. Whenever we look at how we, like, want to do our jobs, we start with testing and we go, actually, you know what? Testing is very, very hard. People build careers out of it, right? And they still go, I have no idea what I'm doing. And it's okay.

And the main reason why testing is so hard is that the systems we're working against are incredibly complex. We think about JavaScript. It's an asynchronous language. We've kind of been doing this. But whenever we think about testing, we think sequentially. We want to go from this step to this step to this step. So years and years ago when I started my career, there was callback hell. And you tried to do it and you hoped that things would run in the right time. The language has improved and it's got much, much better. But then we've got other things that kind of get in the way. We've got browsers. We've got web apps. We've got everything from multiple layers through the entire system that we've got to test. And we think about how we go about doing it and we go, actually, this is really hard. But, we've had like numerous people think about how we approach these problems. And they've tried to simplify them as they go along. And they've come up with kind of cool terms like the testing pyramid, unit testing, integration testing and so on. And I'm going to break it down. Because I think it's important that sometimes words matter. Sometimes I don't think they matter so much.

And so like with the unit testing, this is where I think people get a bit too fixated, but they've tried to break down the problem into something small. And it's a small test. Because sometimes people can't do it at a unit level. And we've got these integration tests where we test our contracts. And this is where we start to see some of the kind of real love that people have.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

A Guide to React Rendering Behavior
React Advanced 2022React Advanced 2022
25 min
A Guide to React Rendering Behavior
Top Content
This transcription provides a brief guide to React rendering behavior. It explains the process of rendering, comparing new and old elements, and the importance of pure rendering without side effects. It also covers topics such as batching and double rendering, optimizing rendering and using context and Redux in React. Overall, it offers valuable insights for developers looking to understand and optimize React rendering.
React Concurrency, Explained
React Summit 2023React Summit 2023
23 min
React Concurrency, Explained
Top Content
Watch video: React Concurrency, Explained
React 18's concurrent rendering, specifically the useTransition hook, optimizes app performance by allowing non-urgent updates to be processed without freezing the UI. However, there are drawbacks such as longer processing time for non-urgent updates and increased CPU usage. The useTransition hook works similarly to throttling or bouncing, making it useful for addressing performance issues caused by multiple small components. Libraries like React Query may require the use of alternative APIs to handle urgent and non-urgent updates effectively.
Making Magic: Building a TypeScript-First Framework
TypeScript Congress 2023TypeScript Congress 2023
31 min
Making Magic: Building a TypeScript-First Framework
Top Content
Daniel Rowe discusses building a TypeScript-first framework at TypeScript Congress and shares his involvement in various projects. Nuxt is a progressive framework built on Vue.js, aiming to reduce friction and distraction for developers. It leverages TypeScript for inference and aims to be the source of truth for projects. Nuxt provides type safety and extensibility through integration with TypeScript. Migrating to TypeScript offers long-term maintenance benefits and can uncover hidden bugs. Nuxt focuses on improving existing tools and finds inspiration in frameworks like TRPC.
Inside Fiber: the in-depth overview you wanted a TLDR for
React Summit 2022React Summit 2022
27 min
Inside Fiber: the in-depth overview you wanted a TLDR for
This Talk explores the internals of React Fiber and its implications. It covers topics such as fibres and units of work, inspecting elements and parent matching, pattern matching and coroutines, and the influence of coroutines on concurrent React. The Talk also discusses effect handlers in React, handling side effects in components, and the history of effect handlers in React. It concludes by emphasizing the importance of understanding React internals and provides learning resources for further exploration.
Deep Diving on Concurrent React
React Advanced 2022React Advanced 2022
29 min
Deep Diving on Concurrent React
The Talk discussed Concurrent React and its impact on app performance, particularly in relation to long tasks on the main thread. It explored parallelism with workers and the challenges of WebAssembly for UI tasks. The concepts of concurrency, scheduling, and rendering were covered, along with techniques for optimizing performance and tackling wasted renders. The Talk also highlighted the benefits of hydration improvements and the new profiler in Concurrent React, and mentioned future enhancements such as React fetch and native scheduling primitives. The importance of understanding React internals and correlating performance metrics with business metrics was emphasized.
Let’s Talk about Re-renders
React Summit 2022React Summit 2022
23 min
Let’s Talk about Re-renders
Top Content
This Talk discusses React performance and how re-renders can affect it. It highlights common mistakes and misconceptions, such as the overuse of useMemo and useCallback hooks. The importance of React.memo in preventing unnecessary child component re-renders is emphasized. Creating components in render functions is identified as a major performance killer, and the benefits of moving state down and wrapping state around children are explained. The Talk also covers optimizing component rendering through memoization and provides a recap of the key points.

Workshops on related topic

React Hooks Tips Only the Pros Know
React Summit Remote Edition 2021React Summit Remote Edition 2021
177 min
React Hooks Tips Only the Pros Know
Top Content
Featured Workshop
Maurice de Beijer
Maurice de Beijer
The addition of the hooks API to React was quite a major change. Before hooks most components had to be class based. Now, with hooks, these are often much simpler functional components. Hooks can be really simple to use. Almost deceptively simple. Because there are still plenty of ways you can mess up with hooks. And it often turns out there are many ways where you can improve your components a better understanding of how each React hook can be used.You will learn all about the pros and cons of the various hooks. You will learn when to use useState() versus useReducer(). We will look at using useContext() efficiently. You will see when to use useLayoutEffect() and when useEffect() is better.
Designing Effective Tests With React Testing Library
React Summit 2023React Summit 2023
151 min
Designing Effective Tests With React Testing Library
Top Content
Featured Workshop
Josh Justice
Josh Justice
React Testing Library is a great framework for React component tests because there are a lot of questions it answers for you, so you don’t need to worry about those questions. But that doesn’t mean testing is easy. There are still a lot of questions you have to figure out for yourself: How many component tests should you write vs end-to-end tests or lower-level unit tests? How can you test a certain line of code that is tricky to test? And what in the world are you supposed to do about that persistent act() warning?
In this three-hour workshop we’ll introduce React Testing Library along with a mental model for how to think about designing your component tests. This mental model will help you see how to test each bit of logic, whether or not to mock dependencies, and will help improve the design of your components. You’ll walk away with the tools, techniques, and principles you need to implement low-cost, high-value component tests.
Table of contents- The different kinds of React application tests, and where component tests fit in- A mental model for thinking about the inputs and outputs of the components you test- Options for selecting DOM elements to verify and interact with them- The value of mocks and why they shouldn’t be avoided- The challenges with asynchrony in RTL tests and how to handle them
Prerequisites- Familiarity with building applications with React- Basic experience writing automated tests with Jest or another unit testing framework- You do not need any experience with React Testing Library- Machine setup: Node LTS, Yarn
Advanced TypeScript types for fun and reliability
TypeScript Congress 2022TypeScript Congress 2022
116 min
Advanced TypeScript types for fun and reliability
Workshop
Maurice de Beijer
Maurice de Beijer
If you're looking to get the most out of TypeScript, this workshop is for you! In this interactive workshop, we will explore the use of advanced types to improve the safety and predictability of your TypeScript code. You will learn when to use types like unknown or never. We will explore the use of type predicates, guards and exhaustive checking to make your TypeScript code more reliable both at compile and run-time. You will learn about the built-in mapped types as well as how to create your own new type map utilities. And we will start programming in the TypeScript type system using conditional types and type inferring.
Are you familiar with the basics of TypeScript and want to dive deeper? Then please join me with your laptop in this advanced and interactive workshop to learn all these topics and more.
You can find the slides, with links, here: http://theproblemsolver.nl/docs/ts-advanced-workshop.pdf
And the repository we will be using is here: https://github.com/mauricedb/ts-advanced