Panel Discussion: Future of Web Testing

This ad is not shown to multipass and full ticket holders
React Summit US
React Summit US 2025
November 18 - 21, 2025
New York, US & Online
The biggest React conference in the US
Learn More
In partnership with Focus Reactive
Upcoming event
React Summit US 2025
React Summit US 2025
November 18 - 21, 2025. New York, US & Online
Learn more
Bookmark
Rate this content

FAQ

The panel discussion aims to explore current trends and future directions in web testing, highlighting recent innovations and discussing these developments with leading experts in the field.

As of the latest check, there are about 17,000 repositories on GitHub that are solely dedicated to testing in JavaScript.

GitHub Actions are a feature within GitHub that allows automation of workflows, particularly in continuous integration and deployment processes. They have rapidly grown in popularity due to their ease of use and extensive community contributions.

Testing Library helps developers write tests that avoid dependencies on internal UI structure or CSS selectors, focusing instead on user interactions. This approach increases the robustness and reliability of tests.

Network mocking allows tests to simulate network responses, making integration tests more reliable and faster by eliminating dependencies on external services and reducing flakiness.

AI in testing is seen as a transformative tool that can automate test creation, manage test coverage more effectively, and reduce flakiness by dynamically adjusting to changes in the application environment.

Focusing on user experience ensures that tests reflect real-world usage, leading to more effective and meaningful test outcomes that directly correlate with user satisfaction and software quality.

TestingLibrary is a set of utilities designed to help test UI components by interacting with the DOM. It supports various frameworks and provides tools that enhance testing accuracy and confidence.

Kent C. Dodds
Kent C. Dodds
Jason Palmer
Jason Palmer
Nancy Du
Nancy Du
Oren Rubin
Oren Rubin
Yoni Goldberg
Yoni Goldberg
33 min
15 Jun, 2021

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Excited to discuss web testing trends with a skilled panel including Nancy and Kent sharing their expertise on testing strategies and tools like TestingLibrary. Discussing hot trends in testing, including GitHub's rapid growth in CI, with panelists sharing expertise and insights on new capabilities for developers. Discussing the benefits of GitHub Actions for managing open source projects and the community-driven approach of GitHub in shaping CI trends. Discussing the importance of GitHub Actions' Docker-based approach for CI steps and introducing the React Testing Library's popularity compared to Jest and Mocha. Discussing the role of Cypress testing library as a utility to enhance confidence in testing within the Cypress framework. Discussing the importance of confidence in testing, the role of the testing library in enhancing query abilities and interactivity, and its impact on separating tests from implementation details to increase confidence levels. Discussing the versatility of the testing library across various frameworks and its role in separating tests from implementation details to enhance confidence levels. Recommendations for learning resources such as testingjavascript.com, Discord community, courses, videos, and blog content are highlighted. Discussing the importance of shifting testing strategies towards a user-perspective, emphasizing the impact on organizational testing strategies. Highlighting the need for a comprehensive approach beyond unit testing, considering high coverage layers like end-to-end testing and integration tests for enhanced confidence and feedback. Discussing the importance of trust in tests, highlighting the significance of reliable tests over high coverage, addressing the challenge of flakiness and the need for trust in test results. Exploring the challenges of flakiness in testing, emphasizing the importance of investing in root cause analysis and comprehensive information gathering for effective bug detection. Developers taking ownership of quality, organizational alignment essential for impactful quality strategies, focusing on high-impact areas rather than test coverage percentages for user-centric testing. Trend towards integration testing, importance of unit tests in specific scenarios, balancing integration and unit testing for efficient testing strategy. Discussing the importance of unit tests in specific scenarios and the emergence of AI-based testing for test augmentation and coverage improvement. Discussing the importance of AI in test generation, selector identification, and reducing flakiness. Exploring network mocking benefits for integration tests and managing mock files efficiently. Discussing the importance of network interception monitoring for improving test stability and performance, with a focus on end-to-end tests and network requests. Encouraging the use of tools like VCR to generate stable mocks and enhance testing efficiency.

1. Introduction to the Future of Web Testing

Short description:

I'm thrilled to kick off this panel about the future of web testing. A lot of great things are happening in this field, with 17,000 repos on testing in JavaScript on GitHub. I have the ideal panel to discuss these trends. Nancy is a solutions architect at Rango.io and Kent is the creator of testingjavascript.com.

Hey, hey. Hey, hey, I'm really happy to be here. I'm thrilled. I'm super excited to kick off this panel about the future of web testing. And I'm so excited because of two reasons. One, a lot of things, great things happening now in this field. Just to give you an example, I checked today in GitHub and there are already 17,000 repos dealing only with testing in JavaScript. 4,000 of them were written in the last year. So, so many things and innovation happening now in testing. The second reason is because I probably have the ideal panel to discuss all of these trends. Really some of the most influential, the people who are building this innovative tool are here with me.

So, how about we start with a quick intro. Let's start with you, Nancy. Would you like to introduce yourself? Sure. I'm really excited to be here. My name is Nancy and I am a solutions architect working at a company called Rango.io. We're a tech consulting agency. So, worked with a lot of clients in the past, enterprise and startups, often times with their testing strategy. Cool. Great to have you, Nancy.

Kent, Zidane, I'm not sure you even need to introduce Kent, but we will, Kent, please tell us about yourself. Yeah, sure. Thanks. Super happy to be here. I love the conferences put off by Git Nation. They do a great job. So yeah, I created testingjavascript.com, where I can teach you everything that I know about testing. It's awesome. So take a look at that. And actually, there's a discount coupon just for TestJS Summit.

1. Introduction to Web Testing Panel

Short description:

Excited to discuss web testing trends with a skilled panel including Nancy and Kent sharing their expertise on testing strategies and tools like TestingLibrary.

Hey, I'm really happy to be here. I'm thrilled. I'm super excited to kick off this panel about the future of web testing and I'm so excited because of two reasons. One, a lot of things great things happening now in this field. Just to give you an example, I checked today in GitHub and there are already 17,000 repos dealing only with testing in JavaScript. 4,000 of them were written in the last year. So many things and innovation happening now in testing. The second reason is because I probably have the ideal panel to discuss all of these trends, some of the most influential people are building this innovative tool here with me. So how about we start with a quick intro? Let's start with you, Nancy, would you like to introduce yourself? Sure, I'm really excited to be here. My name is Nancy and I am a solutions architect working at a company called Rango.io. I also work for a tech consulting agency, so you know, worked with a lot of clients in the past, enterprise and startups, oftentimes with their testing strategy. Cool, great to have you, Nancy. Kent, Siddharth, I'm not sure we even need to introduce Kent, but we will. Kent, please tell us about yourself. Yeah, sure. Thanks. Super happy to be here. I love the conferences put off by Git Nation. They do a great job. So yeah, I created testing-javascript.com, where I can teach you everything that I know about testing. It's awesome. So take a look at that. And actually, there's a discount coupon just for TestJS Summit. So I'll share that in the discord. And I also created TestingLibrary, which is kind of a funny name for a library. But it helps you test DOM-related stuff, so anything that has to do with the DOM, anywhere you can find the DOM. And actually, there are other implementations for React Native and stuff like that, too. But it just gives you utilities that you need to test UI. That's the main idea behind that. So that's what I do.

2. Introduction to Testing Library and CI Trends

Short description:

I also created Testing Library, which helps you test DOM-related stuff. It provides utilities to test UI. We're about to discuss Testing Library soon. Oren is the founder of Testing, focusing on AI in test automation. Jason is a core contributor to Jest and created Jest JUnit. Let's start with the CI world, where GitHub has become a new giant player in the past two years.

So I'll share that in the Discord. And I also created Testing Library, which is kind of a funny name for a library, but it helps you test DOM-related stuff, so anything that has to do with the DOM, anywhere you can find the DOM. And actually, there are other implementations for React Native and stuff like that, too. But it just gives you utilities that you need to test UI. That's the main idea behind that.

So that's what I do. Cool. And we're about to discuss, of course, Testing Library very soon.

Oren, good morning, San Francisco. Hi, everyone. Pleasure to be here. Super excited to be here with everyone. My background is mostly building products for developers the last 22 years. I'm guessing the standard you know is the visual validations. I was one of the founding members, weeks an early developer, and now the founder of the last six years, founder of Testing. We focus on AI helping test automation.

That's great. And we're also going to discuss testing. Jason, hi. Everyone, I'm happy to be here. I'm Jason Palmer. I work at Spotify for the last almost 10 years as an engineer and now a PM. I'm also a core contributor to Jest. I created Jest JUnit. If you're running Jest in a CI environment, there's a pretty good chance you're using that. Amazing. Great. So we're about to discuss now a bunch of topic, a bunch of hot trends in testing. And each of the panelists is going to share his thoughts and experience about each of these hot trends. So how about we start with the CI world? And there is a new giant player, GitHub, now playing in the CI world in the past two years.

3. GitHub Actions and the Future of CI

Short description:

And funnily enough, I just checked today, and each of the big vendors have approximately a hundred extensions or actions, some call them orbs. GitHub, in two years, already have 7,000 GitHub Actions. So it's growing crazily. I've been totally moving everything over to GitHub actions. I've been kind of thinking about it anyway. And my goodness, it's such a nice experience. Can you share one example of any delightful experience, something that just helped you specifically to ship? Yeah. Well, you mentioned the 7,000 different GitHub custom actions that you can use. I didn't have to build any custom or, yeah, custom action of any kind. It was just putting together all these different ones to make things come together in a really nice way. And Nancy, I'm curious to hear your thoughts on this matter. Yeah, I think it's actually super cool. I really like the approach GitHub went with, instead of just focusing on being another CI tool and just focusing on their infrastructure, they really took that open source approach, really encouraging and fostered the community to contribute, and focusing on that marketplace aspect rather than it being an afterthought. I think that's where it's really powerful. And that's probably why we've seen so much growth there so quickly.

And funnily enough, I just checked today, and each of the big vendors have approximately a hundred extensions or actions, some call them orbs. GitHub, in two years, already have 7,000 GitHub Actions. So it's growing crazily. And my question to you, let's start with you, Ken, is this just another big giant eating the market, or are they doing things differently? Do they provide new capabilities, opportunities for us developers?

You know, years ago I did a survey, not like a survey, but I took a survey of all of the CI services that I thought would be good for the company that I was working with at the time. And I tried a ton of them, and I ended up with SnapCI, which is no longer a thing, which is kind of sad. There's GoCD now as their thing, and that's what I used for my company. But then for open source I was all in on TravisCI and it was, it served me really, really well for years. But I don't want to get into this too much, but Travis kind of changed the way that they do things in a way that made it very difficult for open source. And so I've been totally moving everything over to GitHub actions. I've been kind of thinking about it anyway. And my goodness, it's such a nice experience. So there's a reason that I think so many people are going over to GitHub for managing their GitHub actions. There can be some concern with the monopolistic approach, I guess, but I don't know. I'm just trying to ship stuff. And GitHub Actions makes it really easy to do that. So I like it.

Can you share one example of any delightful experience, something that just helped you specifically to ship? Yeah. Well, you mentioned the 7,000 different GitHub custom actions that you can use. I didn't have to build any custom or, yeah, custom action of any kind. It was just putting together all these different ones to make things come together in a really nice way. I wouldn't say that it was super straightforward. There are definitely some nuances and intricacies and things like that. But once you have it set up, it's actually pretty understandable what you have. And I think that, yeah, just the sheer amount of actions that you have at your disposal is super, super helpful.

Yeah. And Nancy, I'm curious to hear your thoughts on this matter. Yeah, I think it's actually super cool. I really like the approach GitHub went with, instead of just focusing on being another CI tool and just focusing on their infrastructure, they really took that open source approach, really encouraging and fostered the community to contribute, and focusing on that marketplace aspect rather than it being an afterthought. I think that's where it's really powerful. And that's probably why we've seen so much growth there so quickly.

4. GitHub Actions and Testing Library

Short description:

GitHub Actions is taking the Docker-based approach, making it easier to reproduce CI steps locally. The testing library, including react testing library and its sisters, is gaining popularity as the most trendy testing framework. Ken, the creator, explains why Cypress testing library should be used alongside Cypress.

And really now GitHub is not limited by how many developers are putting on to really build out their CI or really understanding the user's need because it comes organically, right? They're allowing the community to kind of dictate where this goes. And I think that's super exciting to see. I think it's hard to predict where it will go in the future, especially, you know, a lot of the clients I worked with in the past. Like moving, switching over to a whole new infrastructure is just a huge undertaking and oftentimes not the top priority and just not worth the effort right off the bat.

Yeah. Interesting. Both of you mentioned that the marketplace is the thing, like up front, they build it for the marketplace and this is the core and not some extension like it was in previous CI vendors. Yeah, yeah, sensible. And Oren and Jason, feel free to jump in whenever and everyone. We are a spontaneous here and so it's not- One thing I really like about GitHub Actions, I guess, is that it's kind of one of the CI providers that's taking the like Docker based approach, which is really nice. And it's kind of a new wave that I've seen, I guess, in the last few years. It definitely makes it easier for folks to be able to like reproduce CI steps locally and kind of craft a decent CI environment locally and make sure that it works. And then you kind of, it's a lot less toil basically than you might have with other CI environments.

Yeah, yeah. So bottom line, I think anyone should evaluate the GitHub, at least evaluate it as your next CI. And now moving to the next topic, which is testing library. Well, probably everyone here heard about react testing library. I learned recently that it has sisters, which is X testing library for Cypress, for Puppeteer, for almost any UI framework. And if you're not sure how popular it is, recently the state of JS big survey was published. And people chose a testing library above Jest and Mocha, as their most popular testing framework. Of course, it's not the same thing. But it's, I mean, it was quoted as the most trendy testing library of the past year. And surprisingly, we have the creator Ken. Question for you. So, I'm, I know Cypress. I can do things for this with Cypress. I know to build stuff. And I'm going to start now a new project. Why should I use, for example, Cypress testing library and not Cypress? Essies. Yeah, well, I mean, I think you should use Cypress for sure.

5. The Benefits of Using Testing Library

Short description:

The testing library is a collection of utilities that enhances testing frameworks. It provides a way to query and interact with the DOM, increasing confidence in tests. Using testing library promotes best practices and encourages testing from the user's perspective. It can be used across different UI frameworks and is a valuable tool for developers.

The testing library is a collection of utilities that you use within testing frameworks. It's not a replacement for Jest or Mocha or Cypress, but rather a utility that you tack onto those things. With Cypress, there are built-in commands that you can use instead of what you get from Cypress testing library. However, adding Cypress testing library gives you more confidence, which is the ultimate goal. It offers a nice way to query and interact with the output DOM, making it easier to read and write tests. By using testing library, you can increase the level of confidence in your tests.

As a developer, the main motivation for me to use testing library across different UI frameworks is to reuse my knowledge of the syntax I'm already familiar with and to follow best practices. Testing library encourages testing like the user and focusing on the behavior rather than the internals. You can use testing library wherever you can find a DOM, which is a great advantage.

In summary, the testing library is not a replacement for testing frameworks but a utility that enhances them. It provides a way to query and interact with the DOM, increasing confidence in tests. Using testing library promotes best practices and encourages testing from the user's perspective. It can be used across different UI frameworks and is a valuable tool for developers.

6. The Confidence Boost of Testing Library

Short description:

Whenever I commit code, it should get shipped. And for me to be able to do that, I need to have confidence. Testing library offers a nice way to query and interact with the DOM, increasing confidence in tests.

Whenever I commit code, it should get shipped. And for me to be able to do that, I need to have confidence. And this is what testing library offers is a really nice way to not only query, in Cypress, it's pretty much just for ... Elsewhere, it gives you not only queryability, but also interactivity with that output DOM. And the reason I say you don't need that for Cypress is because Cypress has great interactivity functionality already. So it just adds the ability to query your document really, really well. And not only does it make it easier to read and write those tests, but it also, you end up with more confidence because of the types of things that you're writing in your tests. And so that's the reason. It just helps you increase the level of confidence. That's the most important thing.

7. Benefits and Resources of Testing Library

Short description:

The main motivation for using testing library across different UI frameworks is to reuse knowledge and follow best practices. It helps separate tests from implementation details, providing confidence. Originally specific to React, testing library now supports Angular, Vue, Cypress, and more. It allows for consistent querying and interaction with the DOM in unit, integration, and end-to-end tests. Resources to learn more about testing library include TestingJavascript.com, courses, videos, blog content, and the official documentation.

So just to make it even clearer. So the main motivation for me as a developer to use testing library across different UI framework is mostly to reuse my knowledge that the syntax that I'm already familiar with. Or it kind of pushes me towards best practices. Being like hey, test like the user, don't focus on the internals.

What exactly? Yeah, exactly that. So it's, the fact that you can use testing library wherever you can find a DOM is really awesome thing. But that's not why you use it. The reason that you use it is because it helps separate your tests from implementation details, which is why you get so much confidence out of it. And originally when I wrote testing library, it was actually React testing library specific to React. And then I realized that there was just a very thin integration layer between React and the rest of the DOM. And so I extracted all of that. And then we made Angular testing library and Vue testing library and Cypress testing library. There's a test cafe testing, like anywhere you find a DOM, you can use testing library for it. And that actually is a huge benefit. So you can have your unit and integration tests that are maybe running in Jest or wherever, and they're all hitting the DOM. And then you can also have your end-to-end test. And they look very similar from the way that you're querying and interacting with the DOM, which I think is a huge benefit too.

Sounds like a great opportunity. And I mean, can you recommend resources, places to learn more about testing library? Yeah. TestingJavascript.com is a pretty good place to learn it. And I did share in the discord a short URL, maybe I'll share it again, because people are pretty active in the discord, but yeah, for a 25% discount to testingJavascript.com. But of course, that's not the only place to learn. Like you said, it's very, very popular. There are tons and tons of courses that you can pay for, and also videos that you can watch on YouTube. I've given many talks. I've got lots of free content on my blog. And then the docs are really good. So you can go to testing-library.com and learn more. I personally really like this approach of test from the user perspective, almost as production, and I think that this mindset also inspired many now of the testing strategy of the organization level, testing strategy are being disrupted. So let's play a small role game.

8. Changing Testing Approach for 2021

Short description:

Let's say you're the CTO and I'm your developer. I write unit tests, integration tests, and end-to-end tests. Planning for 2021, you need to understand what you have and how you want to proceed. End-to-end tests and integration tests provide high coverage and confidence. Trust in your tests is crucial. Flaky tests can lead to missed bugs. Root cause analysis and comprehensive information are essential. Flakiness in integration tests is a significant problem. Reducing flakiness requires understanding test results and trending them over time.

Let's say that you are the chief testing officer or the CTO and I'm your developer, and I'm working traditionally. Well, I'm writing unit tests, a lot of unit tests. Then after three weeks, when I have the version working with 100% test coverage, hoo-hoo, then me and the QA person starts writing some integration tests and then some end-to-end testing, then manual testing my version and put in production.

Now we have a meeting and we do our planning for 2021. What exactly, and Oren, let's start with you, what exactly should I change in this approach for the next year? So when you start planning, I think first of all you need to understand what you have and how do you want to go. We all know the pyramid, right, and we all say this is the amount of tests that we have, unit tested, unit tests is not enough, and deciding on over there, everyone tries to reach the hundred percent test coverage. Code coverage is really hard, it's really hard to get to 100% code coverage and sometimes it's not worth it.

So you have those different layers and you need to decide how to start. And sometimes, by the way, if you don't have anything, sometimes it's even nicer to go actually against the tradition and actually start from the top. End-to-end testing and the integration tests give you high coverage very, very fast. And they give you a lot of confidence, as you said, close to production to understand, or you can even test in production to understand what you got. The other thing that you need to make sure is that you don't neglect those other layers and you need to make sure that you keep investing in them because they give you the feedback faster. So the end-to-end are super critical, they give you high confidence, and high coverage in seconds, where they usually, the challenge over there is what Kent said, and I totally agree, is the trust.

You need to trust your tests. If you have tests that are running and you don't trust them, I don't want them. I don't, I prefer 10 tests, they give you 20% coverage and I trust it, then 100% that it's flaky, and when the CI would go, I would say, oh, it failed again, I don't know why. And then what happens is people take tests out, and they say, I don't trust it, let's take it out because I want to release, or they're starting this thing called rerun, you know what, let's run it again, and again, and again, and again, let's rerun it, until everything passes. And that, of course, it covers a lot of bugs that you don't catch because of those flakiness, you might have a real bug, people think that bugs are only deterministic bugs, that you say, hey, I caught this, and this will always reproduce, the most challenging bugs are the one that don't reproduce all the time, when you have that one out of 10, it's gonna happen, and you can ignore that. And I keep telling people, if you had someone, a robbery, you can't say, the robbery is not gonna go up in the same place again, you need to make sure, how do I find the person that did this, how do I find it, and that means how they had all the information, and that brings us to the root cause analysis, understanding, you need to invest in the fact that you'll know when something does break, what happened, do I get, is it, we started with the screenshot, then, you know, the dom, I wanna see the dom, the network request, the console logs, I want to have all the information I need, so that when something does happen, I know I can pinpoint and say, okay, this is it, and of course, the more you go up the dom, it's harder to say, to pinpoint, and as you go more to the, more even toward the unit tests, you can say, oh, here's the function that, the method that went wrong, this is the state. So here gives us, up to here, we see a very, we have a lot of coverage, slow response, that means it's harder running on every commit, and going down, making sure that we have the amount of tests in each, in each part, to know exactly as fast as possible what went wrong.

Yeah, yeah, that makes sense, the wider your tests are, then you need more to invest in setups that prevent flakiness and, yeah, makes tons of sense. Jason, many of your work is related to flakiness, so I'm curious about your overall thought, but also specifically to this, flakiness in integration tests.

Yeah, flakiness is a big problem, but it's also kind of a fascinating field as well, something I'm sort of weirdly interested in. I can sort of say at Spotify, we had kind of a large flakiness problem. That's kind of how I got introduced into working and testing to begin with. The library that I wrote, JestJUnit, the entire reason I wrote it was because I was working on the Spotify desktop client at the time, and we were trying to tackle test flakiness, trying to reduce it significantly. And so the first part in doing that is just basically knowing what tests have run, which one failed, how fast are they, et cetera, et cetera, putting them in a database and sort of trending these things over time. This is kind of the fundamental starting point for just understanding what is flaky and then how are you going to address this. So it's a fascinating field. There's probably tons I could talk about, way more than this conference.

9. Importance of Quality and Testing Strategy

Short description:

Far too many organizations don't recognize that testing and quality actually speed up teams. Moving a bit slower and focusing on quality pays dividends. Developers should own quality and understand its impact on the whole organization. Test coverage alone is not enough; consider high impact areas and concentrate testing efforts there. Communicating and aligning on the quality strategy is critical. Start from the user and focus on them. A trend is moving from Pyramid to Daimon, Trophy, or Honeycomb.

But I guess kind of getting to the original question, something I feel that's important to say is that far too many organizations that I've seen, even now, but particularly in the past, don't really recognize the fact that testing and sort of quality in general actually speeds up teams. So there's this concept in agile called sustainable pace, which I don't know, I just don't see a lot of teams actually following this or really understanding this. A lot of teams are really moving very fast, as quickly as they can. And this often means writing no tests or writing fewer tests. But if you can move just a tad bit slower, and focus on quality and keep that quality high, this actually pays dividends over years and years and years. So this is something that I think is important, not just to developers, but companies as a whole.

I think that one of the big things we actually see is actually that developers do own quality. You mentioned, hey, there's a QA person that's going to say, hey, I think it's becoming more and more that developers own the quality. And they need to say, hey, I feel okay with releasing on a Friday, because that means that you feel secure enough, you're saying, hey, I trust this test, it's not someone else's job to make sure everything works. That's my job. That's my responsibility. Sure. Sometimes it's a good idea to release on Fridays. I would like to add that I feel like quality is not, you know, moving it to having developers be responsible for that is not enough. It's I feel like it's an organizational thing that everyone needs to be aligned on. And I think that's where your quality strategy really becomes impactful, is when it actually helps your whole organization understand what quality means. And that's what enables you to actually move forward and be able to have those confidence in those tasks. Um, which is why I think test coverage isn't always reliable to do that, because it's often just express as number of tasks or a percentage. And it doesn't really at all speak to what they actually do, especially for those people who are non technical, or really remove from the day to day code. Like what are they? What does this test case actually mean in terms of, you know, how does this safeguard my business, and it doesn't say any of that. So a lot of the things that I think is actually important to consider, besides test coverage, or what type of test you're writing is actually be able to identify, you know, features and flows are actually really high impact areas, or high touch areas for your users, whether that's like a dashboard, or a homepage or checkout flow, and really concentrating your testing efforts there, focusing on a few high impact BTE tests. That's what's actually going to give you confidence, you know, understanding your users, are they on Chrome, are they on, you know, desktop versus mobile is going to help narrow down what, you know, what browsers you're actually going to be testing on? Does it make sense to run all your automation tests through every single browser? So a lot of those things, I think, is more important to think about than just the number of tests.

And then, again, that part about communicating about your quality strategy and having everyone within the team and company understand that, I think it's often overlooked, but it's super critical. Yeah. Yeah. And there is a repeating concept here. Start from the user, focus on the user. Okay. We have five minutes left. So, I think that it's absolutely now a significant trend to move from Pyramid to something that is more Daimon or Trophy or Honeycomb.

10. Integration, Unit, and Component Testing

Short description:

Start with integration test or end-to-end. When should I write unit tests? What exactly is component test and what is the new role of unit tests? Confidence is key in testing. Integration tests cover a lot of code, but unit tests are still important for complex logic. Component and integration tests are the main focus, with unit tests filling in the gaps. The next topic is AI-based testing, which has been promised for years.

Start with integration test or end-to-end. By the way, some of the earlier TDD books actually also recommend this. Start with wider tests and then do your unit and TDD stuff. But now as a developer, we all know praise integration test. When should I write now unit test? And also I keep hearing about the new thing, component test. Kenneth, I'll direct first the question to you. What exactly is component test and what is the new role of unit tests?

You know, it all comes down to confidence and how much confidence you can get out of things. If you unit test, let's say you get 100% unit test coverage, you can still have so many integration problems. And so you get a lot of problems there. So let's say, all right, never mind, we won't do 100%. Let's do like a mix here. And then as you start doing more and more integration tests, you realize that you don't need as many unit tests, because you're already covering that code from your integration. And so the, where I, when you keep on down this path, where you end up finding most of your unit tests are in those maybe like pure functions that are doing complicated logic. And those typically they run really fast and they're pretty straightforward to write and maintain. And that's where I find myself doing most of my unit tests. I actually don't find myself doing a whole lot of module mocking in those types of tests either. So I'm pretty much doing component or integration tests. The component is like React component or Angular component, whatever. Integration would be like on the node level. You're integrating a bunch of your modules and stuff. And so yeah, I find myself doing mostly that sort of testing. And then I fill in the gaps for like these hardcore computational or like these algorithmic things that are difficult to cover with the broad brush of a integration test. Yeah. So, there's still a room for a unit test and this should be stated clearly.

A question to back stage, we're almost out of time but we have a lot of fascinating topics still uncovered. So, if we can get five minutes more, please let me know. I'm moving to the next topic which is a promise for years that it's going to affect the testing world and maybe this is the year where it's happening. I'm referring to AI-based testing. Oren, you are the chief, the testing. The testing, I know, is a lot about AI.

11. AI, Network Mocking, and Testing Focus

Short description:

AI can help with test authoring by generating tests based on production data. Network mocking solves the difficult part of writing integration tests, allowing focus on user interactions. The Cypress AutoRecord plugin helps manage mocks and addresses the challenge of changing mock files. Network interception monitoring removes flakiness and improves performance in end-to-end tests. Testing should start from the chaos of production and focus on the user experience.

Question, I mean, can you explain really in layman terms what does it mean to me, really in simple words, features. How can it augment or help testing? We're trying, I think what everyone is trying to get to the same thing, to trust your test. You can look at it at the authoring the test to have as much coverage as possible. I think Nancy said it in an amazing way. Wait a second. How do you define that? How do you see that? I hope that one day we'll get to talk about not just code coverage but also user coverage. Not just the shift left. Shift right. What do we know about production? What do people interact with? What do we not? First of all, AI can help with the authoring. Can we generate, can we look in production and generate automatically 1,000 end-to-end tests in two days just by looking at what's going on in production? Can we filter out of that? What are the tests we want to keep as an end-to-end test? And generating those integration component or unit tests, can we remove the flakiness? Right now things that are basic in every platform was, hey, was one CSS selector. There's one way to find an element and click on it. A machine can look at thousands of them. Can we do that automatically and reduce the flakiness if we understand that a machine can find an element better than us? Yeah. Like identify selectors from previous records that lead more to flakiness. Exactly. And improve that over time. Yeah, makes tons of sense. I would love to discuss it for at least 10 minutes more, but we are just almost out of time and I want to cover the last very important topic.

Story, Jason and Nancy only one minute to cover this. There is a big bloom of tools that related to network interception, network mocking, a lot of new capabilities. You specifically, Nancy, wrote one of these tools. Can you first explain to us why it first record the network? I wish I have more time to talk about this because I think it is super exciting. I think the biggest thing that the network mocking really solves is it takes the most difficult part out of being able to write integration tests. I wish I can elaborate what I mean by integration test because I think it is one of those testing that is super misunderstood and no one really aligns on what it does but I think it really solves that flaky issue that Jason was talking about, you can really focus on things that you can actually visually see, things that are as close to possible as what the users can interact with. I feel like network mocking really allows you to be able to do that without making it super slow and flaky and cause all of those issues. The plugin specifically that I worked on actually tags on what is out of the box already from Cypress, a lot of you who do use Cypress knows it comes with a lot of mocking capabilities and it kind of just tags on top of that to really solve for I think the biggest issue with all of this which is how do we actually manage our mocks, right? Mocking is obviously the number one issue but number two once you're able to mock how do you manage hundreds of, you know, files of mocking that needs to change often and you know that's where you know the plugin Cypress AutoRecord that I wrote really helps to address that but again I love to continue this discussion I know we're out of time. Yeah happy to talk with anyone on discord. Yeah I took a look at it and it looked amazing like re-verify that your integration and practice are a excuse things they are. We've got one last minute grace jason I'll really be glad to hear your take on the network interception monitoring. Yeah sure, just really quickly I mean I think it's an important part of testing you have end-to-end tests and the most typical reason why they're flaky or why they're slow is going to be network requests so if you can kind of take those out of the equation especially if you have something like VCR where you can automatically generate stable mocks, you turn these end-to-end tests into something that is far less flaky and far more performance and basically is testing the same thing using hopefully the same system so there's a lot of benefits to it I would encourage you to look at it especially Nancy's plugin there is a pretty great example. Yeah, thank you Jason and unfortunately we're out of time so really many thanks to all of you for this great insight should I try to summarize it in one sentence is production user, production user leave the internals to the end start from the chaos of production the network from the user from the UX, this is where most of the tooling now innovate and this is where testing should start from and then if you have something complex inside then well we have the traditional, traditional unit and other tools many thanks for all of you for being with me today.

QnA

Exploring CI Trends and GitHub's Impact

Short description:

Discussing hot trends in testing, including GitHub's rapid growth in CI, with panelists sharing expertise and insights on new capabilities for developers.

Cool. And we're about to discuss, of course, Testing Library very soon. Oren, good morning, San Francisco. Hi, everyone. Pleasure to be here. Super excited to be here with everyone. My background is mostly building products for developers in the last 22 years. I'm guessing the standard you know is the applicative, the visual validations. I was one of the founding members, Wix and early developer and now the founder of the last six years, founder of Testing. We focus on AI, helping test automation. That's great. And we're also about to discuss, we're also going to discuss testing. Jason, hi. Hey everyone. I'm happy to be here. I'm Jason Palmer. I work at Spotify for the last almost 10 years as an engineer and now a PM. I'm also a core contributor to Jest and I created Jest JUnit. So if you're running Jest in a CI environment, there's a pretty good chance you're using that. Amazing. Great, so we're about to discuss now a bunch of topic, a bunch of hot trends in testing and each of the panelists is going to share his thoughts and experience about each of these hot trends. So how about we start with the CI world? And there is a new giant player, GitHub, now playing in the CI world in the past two years. And funnily enough, I just checked today and each of the big vendors who operate there for years have approximately 100 extensions or actions, some call these orbs. GitHub in two years already have 7,000 GitHub actions, so it's growing crazily. And my question to you, let's start with you Kent. Is this just another big giant eating the market or are they doing things differently? Do they provide new capabilities, opportunities for us, developers? You know, years ago I did a survey, not like a survey, but I took a survey of all the CI services that I thought would be good for the company that I was working with at the time. I tried a ton of them and I ended up with SnapCI which is no longer a thing, which is kind of sad. There's GoCD now as their thing. And that's what I used it for my company. But then for open source I was all in on TravisCI and it served me really, really well for years.

GitHub Actions and Community-Driven CI Trends

Short description:

Discussing the benefits of GitHub Actions for managing open source projects and the community-driven approach of GitHub in shaping CI trends.

I don't want to get into this too much, but Travis kind of changed the way that they do things in a way that made it very difficult for open source. So I've been totally moving everything over to GitHub Actions. I've been kind of thinking about it anyway. My goodness, it's such a nice experience. So there's a reason that I think so many people are going over to GitHub for managing their GitHub Actions. There can be some concern with the monopolistic approach I guess, but I don't know. I'm just trying to ship stuff and GitHub Actions makes it really easy to do that. So that's, I like it.

Yeah. Can you share one example of any delightful experience? Something that just helped you specifically to ship? Yeah. Well, you mentioned the 7,000 different GitHub Custom Actions that you can use. I didn't have to build any custom or yeah, custom action of any kind. It was just like putting together all these different ones to make things come together in a really nice way. It was just very, I wouldn't say that it was super straightforward. There are definitely some nuances and intricacies and things like that. But once you have it set up, it's actually pretty understandable what you have. And I think that, yeah, just the sheer amount of actions that you can, you have at your disposal is super, super helpful.

Yeah. Yep. And Nancy, I'm curious to hear your thoughts on this matter. Yeah, I think it's actually super cool. I really like the approach kind of GitHub went with. Instead of just focusing on being another CI tool and just focusing on their infrastructure, they really took like that open source approach, really encouraging and fostered the community to contribute and focusing on that marketplace aspect rather than it being sort of an afterthought. And I think that's where it's really powerful. And that's probably why we seen so much growth there. Quickly, and really now sort of GitHub is not, you know, limited by, you know, how many developers are putting on to really build out their CI or really understanding the users need because it comes organically, right? They're allowing the community to kind of dictate where this goes. And I think that's super exciting to see. I think it's hard to predict where it will go in the future. Especially, you know, a lot of the clients I've worked with in the past, like moving, switching over to a whole new infrastructure is just a huge undertaking, and oftentimes not the top priority and just not worth the effort right off the bat. Yeah, interesting.

CI Providers and React Testing Library

Short description:

Discussing the importance of GitHub Actions' Docker-based approach for CI steps and introducing the React Testing Library's popularity compared to Jest and Mocha.

Both of you mentioned that the marketplace is the thing, like upfront, they build it for the marketplace, and this is the core and not some extension like it was in previous CI vendors. Yeah, yeah, sensible. And Oren and Jesse, feel free to jump in whenever and everyone, we are spontaneous here.

So one thing I really like about GitHub Actions, I guess, is that it's kind of one of the CI providers that's taking the, like, Docker-based approach, which is really nice. It's kind of a new wave that I've seen, I guess, in the last few years. It definitely makes it easier for folks to be able to reproduce CI steps locally, and craft a decent CI environment locally, making sure that it works. It's a lot less toil than you might have with other CI environments.

Well, probably everyone here heard about React Testing Library. I learned recently that it has Sisters, which is X testing library for Cypress, for Puppeteer, for almost any UI framework. People chose testing library above Jest and Mocha as their most popular testing framework in the State of JS big survey. It was called the most trendy testing library of the past year. We have the creator here. Ken, question for you: Why should I use Cypress testing library and not Cypress for a new project?

Cypress Testing Utility and Confidence

Short description:

Discussing the role of Cypress testing library as a utility to enhance confidence in testing within the Cypress framework.

Of course, it's not the same thing. But it's, I mean, it was called as the most trendy testing library of past year. And surprisingly, we have the creator here. Ken, question for you. So I know Cypress. I can do things for this with Cypress. I know to build stuff. And I'm going to start now a new project. Why should I use, for example, Cypress testing library and not Cypress? Essies. Yeah.

Well, I mean, I think you should use Cypress for sure. So testing library is a collection of utilities that you use within testing frameworks. So it's not a replacement for Jest or Mocha or Cypress. It's more of a utility that you tack on to those things. Um, and so, like, but that said, with Cypress in particular, there are built-in commands that you can use instead of what you get from Cypress testing library.

And the reason that I can suggest adding in Cypress testing library instead of using like cy dot get, for example, is because it gives you more confidence. And that's all that we're really after. I know that some people, some testers really like to use testing to kind of enhance their design process and everything so they can build out their code. And that's that's great, if that's what you want to do, you know, TDD is awesome, whatever.

Enhancing Testing Confidence with Library

Short description:

Discussing the importance of confidence in testing, the role of the testing library in enhancing query abilities and interactivity, and its impact on separating tests from implementation details to increase confidence levels.

And that's that's great, if that's what you want to do, you know, TDD is awesome, whatever. But for me, I'm mostly and when we talk about running tests in CI, the types of tests that I want to run in CI are the types that can tell me can I ship this or not. I want everybody says don't ship on Fridays. I want to be able to ship on Fridays. I want to ship whenever, whenever I commit code, it should get shipped. And for me to be able to do that, I need to have confidence.

And this is what testing library offers is a really nice way to not only query in Cypress, it's pretty much just for querying, but elsewhere. It gives you not only query ability, but also interactivity with the, that output DOM. And the reason I say you don't need that for Cypress is because Cypress has great interactivity functionality already. So just adds the ability to query your document really, really well. And not only it doesn't make it easier to read and write those tests, but it also, you end up with more confidence because of the types of things that you're writing in your tests.

So, yeah, that's the reason. It just helps you increase the level of confidence. That's the most important thing. So just to make it even clearer. So the main motivation for me as a developer is to use testing library across different UI frameworks. It's mostly to reuse my knowledge that the syntax that I'm already familiar with or it kind of pushes me towards best practices, things like, hey, test like the user, don't focus on the internals. What exactly? Yeah, exactly that.

Utilizing Testing Library Across Frameworks

Short description:

Discussing the versatility of the testing library across various frameworks and its role in separating tests from implementation details to enhance confidence levels. Recommendations for learning resources such as testingjavascript.com, Discord community, courses, videos, and blog content are highlighted.

So it's the fact that you can use testing library wherever you can find a DOM is a really awesome thing, but that's not why you use it. The reason that you use it is because it helps separate your tests from implementation details, which is why you get so much confidence out of it. And originally, when I wrote testing library, it was actually React testing libraries specific to React, and then I realized that there was just a very thin integration layer between React and the rest of the DOM and so I extracted all of that.

And then we made Angular testing library and Vue testing library and Cypress testing library. There's a Test Cafe, testing like anywhere you find a DOM, you can use testing library for it. And that's actually is a huge benefit. So you can have your unit and integration tests that are maybe running in Jest or wherever, and they're all hitting the DOM. And then you can also have your end-to-end test. And they look very similar from the way that you're querying and interacting with the DOM, which I think is a huge benefit too.

Sounds like a great opportunity and where can, I mean, can you recommend resources, places to learn more about testing library? Yeah, testingjavascript.com is a pretty good place to learn it. I did share in the Discord a short URL. Maybe I'll share it again because people are pretty active in the Discord, but yeah, for a 25% discount to testingjavascript.com. But of course, it's not the only place to learn. Like you said, it's very, very popular. There are tons and tons of courses that you can pay for and also videos that you can watch on YouTube. I've given many talks. I've got lots of free content on my blog. And then the docs are really good. So you can go to testing-library.com and learn more.

Evolving Testing Strategy for 2021

Short description:

Discussing the importance of shifting testing strategies towards a user-perspective, emphasizing the impact on organizational testing strategies. Highlighting the need for a comprehensive approach beyond unit testing, considering high coverage layers like end-to-end testing and integration tests for enhanced confidence and feedback.

Yeah, I personally really like this approach of tests from the user perspective almost as production, and I think that this mindset also inspires many now of the testing strategy or the organization level testing strategy are being disrupted.

So let's play a small role game. Let's say that you are the chief testing officer or the CTO, and I'm your developer, and I'm working traditionally. Well, I'm writing unit tests, a lot of unit tests. Then after three weeks, when I have the version working with 100% test coverage, then me and the QA person starts writing some integration tests, and then some end-to-end testing. Then you manual test my version and put in production.

Now, we have a meeting, and we do our planning for 2021. What exactly, and Oren, let's start with you. What exactly should I change in this approach for the next year? When you start planning, I think, first of all, you need to understand what you have and how do you want to do it. We all know the pyramid, right? And we all say this is the amount of tests that we have unit tested.

Unit tests are not enough. Even deciding on over there, everyone tries to reach 100% test coverage. Code coverage is really hard. It's really hard to get to 100% code coverage, and sometimes it's not worth it. So you have those different layers, and you need to decide how to start. And sometimes, by the way, if you don't have anything, sometimes it's even nicer to go actually against the tradition and actually start from the top. End-to-end testing and the integration tests give you high coverage very, very fast.

Trust and Flakiness in Test Results

Short description:

Discussing the importance of trust in tests, highlighting the significance of reliable tests over high coverage, addressing the challenge of flakiness and the need for trust in test results. Emphasizing the value of thorough investigations, root cause analysis, and comprehensive information gathering for effective bug detection and resolution.

And they give you a lot of confidence, as you said, close to production to understand, or you can even test in production to understand what you got. The other thing that you need to make sure is that you don't neglect those other layers, and you need to make sure that you keep investing in them, because they give you the feedback faster. So the end-to-end are super-critical. They give you high confidence and high coverage in seconds, where they usually... The challenge over there is what Ken said, and I totally agree, is the trust. You need to trust your tests. If you have tests that are running and you don't trust them, I don't want them. I prefer 10 tests that give you 20% coverage and I trust it than 100% that it's flaky. And when the CI would go, I was like, Oh, I fail again. I don't know why.

People take tests out and they say, I don't trust it. Let's take it out because I want to release. Or they're starting this thing called rerun. You know what, let's run it again and again, and again, and again, let's rerun until everything passes. And that's, of course, it covers a lot of bugs that you don't catch because of those flakiness. You might have a real bug. People think that bugs are only deterministic bugs that you say, hey, I caught this and this is over as they produce. The most challenging bugs are the ones that don't reproduce all the time. When you have that ones out of 10, it's going to happen.

How do I find the person that did this? How do I find it, and that means how they had all the information and that brings us to the root cause analysis, understanding you need to invest in the fact that you know when something does break, what happened? We started with the screenshot, then you know the DOM, I want to see the DOM, the network request, the console logs, I want to have all the information I need, so that's when something does happen, I know I can pinpoint say, okay, this is it, and of course, the more you go up the DOM, it's harder to say, to pinpoint, and as you go more to the, more even toward the unit test, you can say, oh, here's the function that the method that went wrong, this is the state, so here it gives us, up to here, we see, a very, we have a lot of coverage, slow response, that means it's hard to run it on every commit, and going down, making sure that we have the amount of test in each part, to know exactly as fast as possible what went wrong. Yep, that makes sense, the wider your test are, then you need more to invest in setups that prevent flakiness and yeah, it makes tons of sense.

Root Cause Analysis and Flakiness Challenges

Short description:

Exploring the challenges of flakiness in testing, emphasizing the importance of investing in root cause analysis and comprehensive information gathering for effective bug detection. Addressing the significance of recognizing the impact of testing and quality on team productivity, advocating for a sustainable pace in development for long-term benefits.

You need to make sure, how do I find the person that did this? How do I find it, and that means how they had all the information and that brings us to the root cause analysis, understanding you need to invest in the fact that you know when something does break, what happened? We started with the screenshot, then you know the DOM, I want to see the DOM, the network request, the console logs, I want to have all the information I need, so that's when something does happen, I know I can pinpoint say, okay, this is it, and of course, the more you go up the DOM, it's harder to say, to pinpoint, and as you go more to the, more even toward the unit test, you can say, oh, here's the function that the method that went wrong, this is the state, so here it gives us, up to here, we see, a very, we have a lot of coverage, slow response, that means it's hard to run it on every commit, and going down, making sure that we have the amount of test in each part, to know exactly as fast as possible what went wrong. Yep, that makes sense, the wider your test are, then you need more to invest in setups that prevent flakiness and yeah, it makes tons of sense.

Jason, many of your work is related to flakiness, I'm curious about your overall thought, but also specifically to this flakiness in integration tests. Yeah, flakiness is a big problem, but it's also kind of a fascinating field as well, something I'm sort of weirdly interested in. I can sort of say at Spotify, we had kind of a large flakiness problem, that's kind of how I got introduced into working and testing to begin with. The library that I wrote, jSJUnit, the entire reason I wrote it was because I was working on the Spotify desktop client at the time, and we were trying to tackle test flakiness, trying to reduce it significantly. And so the first part in that is just basically knowing what tests have run, which ones failed, how fast are they, et cetera, et cetera, putting them in a database and sort of trending these things over time. This is kind of the fundamental starting point for just understanding what is flakiness and what is flaky and then how are you going to address this. So it's a fascinating field. There's probably tons I could talk about, way more than this conference, but I guess kind of getting to the original question, something I feel that's important to say is that far too many organizations that I've seen even now, but particularly in the past, don't really recognize the fact that testing and sort of quality in general actually speeds up teams. So there's this concept in agile called sustainable pace, which I don't know, I just don't see a lot of teams actually following this or really understanding this. A lot of teams are really moving very fast, as quickly as they can, and this often means writing no tests or writing fewer tests. But if you can move just a tad bit slower and focus on quality and keep that quality high, this actually, you know, pays dividends over years and years and years. So this is something that I think is important, not just to developers, but companies as a whole.

Quality Ownership and Organizational Alignment

Short description:

Developers taking ownership of quality, organizational alignment essential for impactful quality strategies, focusing on high-impact areas rather than test coverage percentages for user-centric testing.

I think that one of the big things we actually see is actually that developers do own quality. Yoni, you mentioned, hey, there's a QA person that's going to say, hey, what's up. I think it's becoming more and more that developers own the quality. And they need to say, hey, I feel okay with releasing on a Friday. Because that means that you feel secure enough that you're saying, hey, I trust this test. It's not someone else's job to make sure everything works. That's my job. That's my responsibility. Sure. Sometimes it's a good idea to release on Fridays. Yeah.

I would like to add that I feel like quality is not, you know, moving it to, having developers be responsible for that, is not enough. I feel like it's an organizational thing that everyone needs to be aligned on. And I think that's where, like, your quality strategy really becomes impactful, is when it actually helps your whole organization understand what quality means. And that's what enables you to actually move forward and be able to have those confidence in those tasks. Which is why I think test coverage isn't always reliable to do that, because it's often just expressed as number of tasks or a percentage.

So a lot of the things that I think is actually important to consider besides test coverage, or what type of test you're writing is actually be able to identify features and flows that are actually really high impact areas or high touch areas for your users, whether that's like a dashboard or a homepage or a checkout flow, and really concentrating your testing efforts there, focusing on a few high-impact ETE tasks. That's what's actually going to give you confidence, understanding your users. Are they on Chrome? Are they on desktop versus mobile? It's going to help narrow down what browsers you're actually going to be testing on. Does it make sense to run all your automation tests through every single browser? A lot of those things, I think, are more important to think about than just the number of tasks. Then again, that part about communicating about your quality strategy and having everyone within the team and company understand that, I think it's often overlooked, but it's super critical.

Integration Testing Trends and Unit Test Role

Short description:

Trend towards integration testing, importance of unit tests in specific scenarios, balancing integration and unit testing for efficient testing strategy.

Yeah. There is a repeating concept here. Start from the user. Focus on the user. Okay. We have five minutes left. So, I think that it's absolutely now a significant trend to move from pyramid to something that is more diamond or trophy or honeycomb. Start with integration test or end to end. By the way, some of the earlier TDD books actually also recommend this. Start with wider test and then do your unit and TDD stuff. But, now, as a developer, we all know praise integration test. When should I write now unit test? And also, I keep hearing about new component test. Kenneth, I'll direct the question to you, what is the new role of unit test?

You know, it all comes down to confidence and how much confidence you can get out of things. And if you unit test, let's say you get 100% unit test coverage, you can still have so many integration problems. And so, you get a lot of problems there. So, let's say, all right, nevermind. We won't do 100%. Let's do like a mix here. And then as you start doing more and more integration tests, you realize that you don't need as many unit tests because you're already covering that code from your integration. And so, when you keep on down this path, where you end up finding most of your unit tests are in those maybe like pure functions that are doing complicated logic, and those typically they run really fast, and they're pretty straightforward to write and maintain.

And that's where I find myself doing most of my unit tests. I actually don't find myself doing a whole lot of module mocking in those types of tests either. So, I'm pretty much doing component or integration tests. The component is like React component or Angular component, whatever. Integration would be like on the node level you're integrating a bunch of your modules and stuff. And so, yeah, I find myself doing mostly that sort of testing. And then I fill in the gaps for like these hardcore computational or like these algorithmic things that are difficult to cover with the broad brush of an integration test. Yeah.

Unit Test Relevance and AI-Based Testing Emergence

Short description:

Discussing the importance of unit tests in specific scenarios and the emergence of AI-based testing for test augmentation and coverage improvement.

And then I fill in the gaps for like these hardcore computational or like these algorithmic things that are difficult to cover with the broad brush of an integration test. Yeah. So, there's still room for unit test, and this should be stated clearly.

Question to backstage. We're almost out of time, but we have a lot of fascinating topics still uncovered. So, if we can get five minutes more, please, let me know. I'm moving to the next topic, which is a promise for years that it's going to affect the testing world. And maybe this is the year where it's happening.

I'm referring to AI-based testing. Oren, you are the chief, the guru at testing, the testing, a lot about AI. Question. I mean, can you explain really in layman terms, what does it mean to me, really in simple words features, how can it augment or help testing? We're trying, I think what everyone is trying to get to the same thing, to trust your tests.

AI in Test Generation and Network Mocking Benefits

Short description:

Discussing the importance of AI in test generation, selector identification, and reducing flakiness. Exploring network mocking benefits for integration tests and managing mock files efficiently.

So you can look at it at the level of like offering the test to have as much as coverage as possible. And I think Nancy said it in an amazing way that, wait a second, how do you define that? How do you see that? I hope that one day we'll get to talk about not just code coverage but also user coverage, not just the shift left shift, right? What do we know about production? What do people interact with? What do we not? So first of all, AI can help with the authoring. Can we generate, can we look in production and generate automatically a thousand end-to-end tests in two days just by looking at what's going on in production? Can we filter out of that? What are the tests that we do want to keep as an end-to-end test. And of course, generating those integration components or even unit tests. Can we remove the flakiness? Right now, things like they're basic in every platform was, hey, it was one CSS selector. There's one way to find an element and click on it. A machine can look at thousands of them. So can we do that automatically and reduce the flakiness if we understand that a machine can find an element better than us? Yeah, like identify selectors from previous records that lead more to flakiness. Exactly. And it moves that over time. Yeah, makes tons of sense. I would love to discuss it for at least 10 minutes more. But we are just almost out of time. And I want to cover the last very important topic.

Story, Jason, only one minute to cover this. There is a big bloom of tools that relate to network interception, network mocking, a lot of new capabilities. You specifically, Nancy, wrote one of these tools. Can you first explain to us why it first recorded the network? So I wish I had more time to talk about this because I think it's super exciting. But I think the biggest thing that the network mocking really solves is, you know, it takes the most difficult part out of being able to write integration tests. And I wish I can go into elaborate what I mean by integration tests, because I think it's one of those testing that that's super misunderstood and no one really aligns on what it does. But, you know, I think it really solves that flaky issue that Jason was talking about. You can focus on things that you can actually visually see, things that's as close to possible as what the users can interact with. And I feel like network mocking really allows you to be able to kind of do that without making it super slow and, you know, flaky and cause all those issues. The plugin specifically that I worked on actually tags on what is out of the box already from Cypress. A lot of you who do use Cypress know it comes with a lot of mocking capabilities and it kind of just tags on top of that to really solve for, I think, the biggest issue with all this, which is how do we actually manage our mocks, right? Mocking is obviously number one issue, but number two, once you're able to mock, how do you manage hundreds of, you know, files of mocking that needs to change often? I feel like that's where, you know, the plugin Cypress Autorecord that I wrote really helps to address that. But again, I love to continue this discussion. I know we're out of time. Happy to talk with anyone on Discord. Yeah. I took a look at it and it looked amazing.

Network Interception Monitoring for Test Stability

Short description:

Discussing the importance of network interception monitoring for improving test stability and performance, with a focus on end-to-end tests and network requests. Encouraging the use of tools like VCR to generate stable mocks and enhance testing efficiency.

Verify that your integration and practice are a few things they are. We got one last minute, Grace. Jason, I'll really be glad to hear your take on network interception monitoring.

Yeah, sure. Just really quickly. I mean, I think it's an important part of testing. You have end-to-end tests, and the most typical reason why they're flaky or why they're slow is going to be network requests. So if you can kind of take those out of the equation, especially if you have something like VCR where you can automatically generate stable mocks, you turn these end-to-end tests into something that is far less flaky and far more performance, and basically is testing the same thing using hopefully the same system. So there's a lot of benefits to it. I would encourage you to look at it, especially Nancy's plugin there is a pretty great example.

Yeah. Thank you, Jason. And unfortunately, we're out of time. So really many thanks to all of you for this great insight. Should I try to summarize it in one sentence is production user, production user. Leave the internals to the end. Start from the chaos of production, the network, from the user, from the UX. This is where most of the tooling now innovate. And this is where testing should start from. And then if you have something complex inside that, well, we have the traditional tools. Many thanks for all of you for being with me today. Thank you. Thank you. Thanks, everyone.

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

Network Requests with Cypress
TestJS Summit 2021TestJS Summit 2021
33 min
Network Requests with Cypress
Top Content
Cecilia Martinez, a technical account manager at Cypress, discusses network requests in Cypress and demonstrates commands like cydot request and SCI.INTERCEPT. She also explains dynamic matching and aliasing, network stubbing, and the pros and cons of using real server responses versus stubbing. The talk covers logging request responses, testing front-end and backend API, handling list length and DOM traversal, lazy loading, and provides resources for beginners to learn Cypress.
Testing Pyramid Makes Little Sense, What We Can Use Instead
TestJS Summit 2021TestJS Summit 2021
38 min
Testing Pyramid Makes Little Sense, What We Can Use Instead
Top Content
Featured Video
Gleb Bahmutov
Roman Sandler
2 authors
The testing pyramid - the canonical shape of tests that defined what types of tests we need to write to make sure the app works - is ... obsolete. In this presentation, Roman Sandler and Gleb Bahmutov argue what the testing shape works better for today's web applications.
Full-Circle Testing With Cypress
TestJS Summit 2022TestJS Summit 2022
27 min
Full-Circle Testing With Cypress
Top Content
Cypress is a powerful tool for end-to-end testing and API testing. It provides instant feedback on test errors and allows tests to be run inside the browser. Cypress enables testing at both the application and network layers, making it easier to reach different edge cases. With features like AppActions and component testing, Cypress allows for comprehensive testing of individual components and the entire application. Join the workshops to learn more about full circle testing with Cypress.
Test Effective Development
TestJS Summit 2021TestJS Summit 2021
31 min
Test Effective Development
Top Content
This Talk introduces Test Effective Development, a new approach to testing that aims to make companies more cost-effective. The speaker shares their personal journey of improving code quality and reducing bugs through smarter testing strategies. They discuss the importance of finding a balance between testing confidence and efficiency and introduce the concepts of isolated and integrated testing. The speaker also suggests different testing strategies based on the size of the application and emphasizes the need to choose cost-effective testing approaches based on the specific project requirements.
Playwright Test Runner
TestJS Summit 2021TestJS Summit 2021
25 min
Playwright Test Runner
Top Content
The Playwright Test Runner is a cross-browser web testing framework that allows you to write tests using just a few lines of code. It supports features like parallel test execution, device emulation, and different reporters for customized output. Code-Gen is a new feature that generates code to interact with web pages. Playwright Tracing provides a powerful tool for debugging and analyzing test actions, with the ability to explore trace files using TraceViewer. Overall, Playwright Test offers installation, test authoring, debugging, and post-mortem debugging capabilities.
Everyone Can Easily Write Tests
TestJS Summit 2023TestJS Summit 2023
21 min
Everyone Can Easily Write Tests
Playwright is a reliable end-to-end testing tool for modern web apps that provides one API, full isolation, fast execution, and supports multiple languages. It offers features like auto-weighting, retrying assertions, seamless testing of iframes and shadow DOM, test isolation, parallelism, and scalability. Playwright provides tools like VS Code extension, UiMode, and Trace Viewer for writing, debugging, and running tests. Effective tests prioritize user-facing attributes, use playwright locators and assertions, and avoid testing third-party dependencies. Playwright simplifies testing by generating tests, providing code generation and UI mode, and allows for easy running and debugging of tests. It helps in fixing failed tests and analyzing DOM changes, fixing locator mismatches, and scaling tests. Playwright is open source, free, and continuously growing.

Workshops on related topic

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
Detox 101: How to write stable end-to-end tests for your React Native application
React Summit 2022React Summit 2022
117 min
Detox 101: How to write stable end-to-end tests for your React Native application
Top Content
Workshop
Yevheniia Hlovatska
Yevheniia Hlovatska
Compared to unit testing, end-to-end testing aims to interact with your application just like a real user. And as we all know it can be pretty challenging. Especially when we talk about Mobile applications.
Tests rely on many conditions and are considered to be slow and flaky. On the other hand - end-to-end tests can give the greatest confidence that your app is working. And if done right - can become an amazing tool for boosting developer velocity.
Detox is a gray-box end-to-end testing framework for mobile apps. Developed by Wix to solve the problem of slowness and flakiness and used by React Native itself as its E2E testing tool.
Join me on this workshop to learn how to make your mobile end-to-end tests with Detox rock.
Prerequisites- iOS/Android: MacOS Catalina or newer- Android only: Linux- Install before the workshop
API Testing with Postman Workshop
TestJS Summit 2023TestJS Summit 2023
48 min
API Testing with Postman Workshop
Top Content
WorkshopFree
Pooja Mistry
Pooja Mistry
In the ever-evolving landscape of software development, ensuring the reliability and functionality of APIs has become paramount. "API Testing with Postman" is a comprehensive workshop designed to equip participants with the knowledge and skills needed to excel in API testing using Postman, a powerful tool widely adopted by professionals in the field. This workshop delves into the fundamentals of API testing, progresses to advanced testing techniques, and explores automation, performance testing, and multi-protocol support, providing attendees with a holistic understanding of API testing with Postman.
1. Welcome to Postman- Explaining the Postman User Interface (UI)2. Workspace and Collections Collaboration- Understanding Workspaces and their role in collaboration- Exploring the concept of Collections for organizing and executing API requests3. Introduction to API Testing- Covering the basics of API testing and its significance4. Variable Management- Managing environment, global, and collection variables- Utilizing scripting snippets for dynamic data5. Building Testing Workflows- Creating effective testing workflows for comprehensive testing- Utilizing the Collection Runner for test execution- Introduction to Postbot for automated testing6. Advanced Testing- Contract Testing for ensuring API contracts- Using Mock Servers for effective testing- Maximizing productivity with Collection/Workspace templates- Integration Testing and Regression Testing strategies7. Automation with Postman- Leveraging the Postman CLI for automation- Scheduled Runs for regular testing- Integrating Postman into CI/CD pipelines8. Performance Testing- Demonstrating performance testing capabilities (showing the desktop client)- Synchronizing tests with VS Code for streamlined development9. Exploring Advanced Features - Working with Multiple Protocols: GraphQL, gRPC, and more
Join us for this workshop to unlock the full potential of Postman for API testing, streamline your testing processes, and enhance the quality and reliability of your software. Whether you're a beginner or an experienced tester, this workshop will equip you with the skills needed to excel in API testing with Postman.
Monitoring 101 for React Developers
React Summit US 2023React Summit US 2023
107 min
Monitoring 101 for React Developers
Top Content
WorkshopFree
Lazar Nikolov
Sarah Guthals
2 authors
If finding errors in your frontend project is like searching for a needle in a code haystack, then Sentry error monitoring can be your metal detector. Learn the basics of error monitoring with Sentry. Whether you are running a React, Angular, Vue, or just “vanilla” JavaScript, see how Sentry can help you find the who, what, when and where behind errors in your frontend project. 
Workshop level: Intermediate
Testing Web Applications Using Cypress
TestJS Summit - January, 2021TestJS Summit - January, 2021
173 min
Testing Web Applications Using Cypress
Top Content
Workshop
Gleb Bahmutov
Gleb Bahmutov
This workshop will teach you the basics of writing useful end-to-end tests using Cypress Test Runner.
We will cover writing tests, covering every application feature, structuring tests, intercepting network requests, and setting up the backend data.
Anyone who knows JavaScript programming language and has NPM installed would be able to follow along.
Best Practices for Writing and Debugging Cypress Tests
TestJS Summit 2023TestJS Summit 2023
148 min
Best Practices for Writing and Debugging Cypress Tests
Top Content
Workshop
Filip Hric
Filip Hric
You probably know the story. You’ve created a couple of tests, and since you are using Cypress, you’ve done this pretty quickly. Seems like nothing is stopping you, but then – failed test. It wasn’t the app, wasn’t an error, the test was… flaky? Well yes. Test design is important no matter what tool you will use, Cypress included. The good news is that Cypress has a couple of tools behind its belt that can help you out. Join me on my workshop, where I’ll guide you away from the valley of anti-patterns into the fields of evergreen, stable tests. We’ll talk about common mistakes when writing your test as well as debug and unveil underlying problems. All with the goal of avoiding flakiness, and designing stable test.