But if you were testing and like playwright with WebKit, you would never hit that bug because WebKit didn't have it, right? And then iOS Safari didn't have it either. But it was only on desktop, right? And so you had this weird bug that your CI CD would have been passing. And this goes against to me, the principle of least astonishment or least surprise, right? Like you shouldn't be getting surprises like that. And there's no way to track it back.
So I'm very much use headed browsers as much as possible, but I do understand there's trade-offs, right? So. No, totally, yeah. And I love the path of least astonishment. I will be using it again. In the future. And we're working on browsers and someone asks, especially with the way the web works, like, we're gonna have requests from the server. So should we have mock requests from a server or not? And why? I think the testing pyramid here comes in very quickly. Like when you've got your end-to-end tests, don't use mocks, but if you're doing component tests, do mocks, right? Like put everything in. Make those tests as fast as possible because you really wanna fail as fast as possible, right? Like ThoughtWorks decades ago, when they brought out their CI, the pipelines, they were like, yeah, builds should take no longer than 10 minutes because people like get distracted, right? Like mobile phones nowadays, people are like, oh yeah, it was cool building, let's do this. And it's like, oh wait, I've wasted an hour, right? Like having those quick feedback loops definitely have mocks and then kind of, but it's a balance. Don't do it everywhere. No, totally.
All right, we have time for one more sneak question, which is especially about the test of time. Do you think Chrome for testing will pass the test of time? Is it not better to be where your user is, which in my opinion is kind of the point of your talk, right? Yeah, so I do think it's gonna stand the test of time, right? Like when it comes to testing, we need, I'm trying to think of the right word here. We need to kind of make sure that our tests are deterministic. That's the way I was trying to think of, right? Chrome for testing allows for determinism, but you can still, it's going to be the same Chrome that ships, but they kind of have, they've taken the auto updater out and then they, so you're using what your users are and now you don't have the auto updates, but then tools like Puppeteer, Selenium Manager, things like that, they should be updating those as things go along. So you're kind of keeping where your user are, but you've also got a deterministic browser on your system. Now, totally. All right, we don't have time for any more questions. However, you will be able to find David throughout the day. And also he will also be at the speaker's discussion room later on. So definitely walk up and say hi and ask any other questions that you have. But let's give him one more round of applause. Thank you.
Comments