(Actually good) browser testing w/ Nuno Maduro
00:00:06.42
Chris Morrell
All right, welcome back to Over Engineered, the podcast where we ask the question, what's the absolute best way to do things we already have a perfectly acceptable solution for?
00:00:16.99
Chris Morrell
ah Today, i am here with Nuna Maduro. Hey, Nuna, how are you doing?
00:00:21.76
nuno maduro
Dude, thank you so much for having me here. It's a pleasure, man.
00:00:25.04
Chris Morrell
Um, usually I ask my guests to do a quick introduction. I'm tempted to do one for you, but i I worry that I would leave some stuff out because you've just got so much going on. So you want to just say a quick hello and and introduce to yourself.
00:00:37.29
nuno maduro
Yeah. So hello everyone. My name is Nuno Maduro. I am a Portuguese software engineer working at Laravel.
00:00:46.06
nuno maduro
I'm also the creator of PastPHP, which is a testing framework for PHP. And I guess that's it
00:00:55.62
Chris Morrell
ah I know that there's a lot more than that, but that'll do for now. We'll probably get into the other things. um Today, i ah the the reason that I reached out to you was um essentially I've been on this multi-year quest to ah figure out how to make browser testing not suck in PHP. And I and ah you know, you came out on stage at Laracon and you, you basically showed this demo where it was like, Oh, Nuno has just figured it out.
00:01:28.09
Chris Morrell
And, uh, I, I just really want to dig into the nuts and bolts of, of how you did it. Um, I'm curious, I'm curious to see what, you know, what you found made it possible.
00:01:41.06
Chris Morrell
um And it's just something that's been sort of a curiosity of mine for for a number of years now. So I'm just like, I'm just kind of excited to hear ah the the ah really gritty technical details if we can get into it.
00:01:53.54
Chris Morrell
I'm sure there's a lot really interesting stuff there.
00:01:53.74
nuno maduro
Yeah, and Yeah, and honestly, it feels kind of good to have more than 30 minutes to be able to talk a little bit about my more of the details, like why I've done it and what is the reasoning, what technology did I pick, how do I solve some problems, because at Latacone US, I had to cut out so much stuff.
00:02:01.65
Chris Morrell
Yeah.
00:02:14.37
nuno maduro
you know And for those who are listening, i was also one of the speakers at LataCon US and I presented Pest 4, which comes with bronzer testing.
00:02:14.88
Chris Morrell
Yeah.
00:02:21.46
nuno maduro
And I had like a slot of 30 minutes. and And obviously I had to demo as much as possible of what's coming for Pest V4 in terms of bronzer testing, but I had left so much off of it.
00:02:33.30
nuno maduro
And one of the my big scaries was you know, are people really understanding the value of this? Because if you haven't used any bronzer testing in the past, you have no idea how much like how much value we're seeing on stage right now.
00:02:48.50
nuno maduro
So maybe i was thinking like Chris, maybe we can start about talking a little bit about what was the existing state of bronzer testing in the PHP world.
00:02:48.62
Chris Morrell
Yeah. Yeah. Sure.
00:02:56.29
Chris Morrell
yeah
00:02:56.69
nuno maduro
And I will share my experience and then maybe you can share yours too.
00:03:00.05
Chris Morrell
sure
00:03:00.16
nuno maduro
So my experience was You know, i've I've started a couple projects where I needed bronzer testing and I used, you know, I tried to use lot of L-Dusk. And my experience with lot of L-Dusk is it would kind of work well for the very first test or two.
00:03:18.83
nuno maduro
But once you just scale, once you scale your test suite to, you know, hundreds of tests or potentially you, you know, start having some complex situations, it would always end up resulting on flaky tests and,
00:03:31.64
nuno maduro
ah super slow test suites. We were talking about dozens of minutes. um And you know this happened like, I don't want to lie, but probably like in between five and 10 times already where I had to literally ditch out lot of L-Dusk.
00:03:44.99
Chris Morrell
yeah
00:03:45.35
nuno maduro
And in the betweens of these years where I've tried a lot of L-Dusk, I have literally moved to other solutions. I remember the first one being Cypress.
00:03:55.36
nuno maduro
Have you used Cypress already?
00:03:56.12
Chris Morrell
and
00:03:57.13
nuno maduro
You had?
00:03:57.40
Chris Morrell
I've used Cypress a little bit, and I i know that um ah there's there's some tooling around Laravel and Cypress, but it's mostly I've played around with it just like you know as a separate test suite, not using any of the Laravel niceties.
00:04:05.74
nuno maduro
Okay.
00:04:14.15
nuno maduro
Right, exactly. So that is plus that. Cypress is literally a JavaScript test suite.
00:04:19.04
Chris Morrell
Yeah.
00:04:19.11
nuno maduro
So you you cannot enjoy ah the goodies that Laravel gives you, ah but also it's JavaScript. So from that point, that is already...
00:04:25.76
Chris Morrell
Yeah. I think maybe Jeffrey Way has built a little bit of something to help ease that pain, but it is, it's just a JavaScript testing tool. Yeah.
00:04:35.42
nuno maduro
Right. And, you know, I used to press a little bit, but I was not happy because it's not PHP. It's just kind of a pain to write a test for this and kind of make it well integrated with Laravel. And, you know, early this year, actually, I started playing with Playwright.
00:04:50.76
Chris Morrell
Yeah. Yeah.
00:04:51.55
nuno maduro
And I was like, holy moly. Like, this is actually the very first time ever that I'm writing tests. It's not integrated with Laravel. It's not PHP, but they are fast. And
00:05:02.28
Chris Morrell
yeah
00:05:02.56
nuno maduro
And they are not flacky. It's the very first time i actually thought, OK, they actually figured it out.
00:05:04.18
Chris Morrell
yeah
00:05:07.15
nuno maduro
you know um On top of that, it came with a bunch of new features like natively parallel testing mode. um There was a bunch of visual testing, recording. There was a bunch of new features that was like, oh, this is this that this is it. you know
00:05:22.42
Chris Morrell
Yeah.
00:05:22.50
nuno maduro
This is it. If we are going to ever have something in the PHP world, it needs to be on top of this because this actually works. you know
00:05:31.91
Chris Morrell
Yeah.
00:05:32.65
nuno maduro
um Was that your experience with you as well, like ah over the years?
00:05:33.98
Chris Morrell
Isn't it?
00:05:36.37
Chris Morrell
Yeah, no, that's that's exactly it. I think it's, i've been I've been really struck by like, isn't it weird to be in 2025 and sort of think, oh, the the open source solution from Microsoft is probably the good one. Yeah.
00:05:54.47
Chris Morrell
you know like I feel like they've become such good stewards of like open source tooling in the in the last decade or you know five years or whatever.
00:06:01.53
nuno maduro
Oh, yeah.
00:06:02.97
Chris Morrell
And it's it's just such a strange shift.
00:06:03.00
nuno maduro
Oh yeah.
00:06:05.30
Chris Morrell
But yeah, when when I started hearing about Playwright, I remember being like, ah okay, we have to try another tool, right?
00:06:13.48
nuno maduro
Mm-hmm.
00:06:13.85
Chris Morrell
But I think I gave it a little bit more, or I was a little bit more willing to actually give it a shot because of that, because like Microsoft has been doing a really good job of of producing good tooling for for developers.
00:06:29.73
Chris Morrell
um And yeah, I definitely found myself ah thinking like, do we just ditch Dusk and just rewrite everything as playwright tests? And for those things that are like,
00:06:42.18
Chris Morrell
a little bit annoying. Okay, we just write the, if you need to authenticate, you just go ahead and walk through the login process for the test. Just accept that some things are going to be clunkier, but at least we're using a tool that's um that's solid and fast and and doesn't seem to be so flaky. I i felt the same way.
00:07:03.32
Chris Morrell
um I think that Chrome driver has gotten a little bit better in the early days of using Dusk and Chrome. um I know in our code base, at least we had a lot of custom scripts that would like essentially check a checkbox through JavaScript because Chrome driver would like not consistently check the checkbox if you just asked it to, or,
00:07:25.77
Chris Morrell
or um There were a lot of workarounds that you had to do to make the test actually work. um So i think I think that the like browser automation in general has gotten a lot better across all the platforms, whether it's whether it's you know Selenium or Cypress or Playwright.
00:07:42.19
Chris Morrell
But Playwright certainly seems to be the most solid at this point.
00:07:45.73
nuno maduro
Right.
00:07:46.71
Chris Morrell
Yeah.
00:07:46.69
nuno maduro
ah One quick question, dude. um This will be post-processed, right? Because I'm not seeing my voice being recorded on the bottom.
00:07:52.38
Chris Morrell
Yes.
00:07:54.33
nuno maduro
Is that out normal?
00:07:54.71
Chris Morrell
Yep. No, you're fine. Yeah, I see it over here.
00:07:57.07
nuno maduro
OK, thank you.
00:07:57.75
Chris Morrell
It's all goingnna be it's all going to be leveled and post-processed. and
00:08:01.15
nuno maduro
Okay, cool.
00:08:01.37
Chris Morrell
you know And if not, we've got your YouTube we've got your youtube videos, so we'll be fine.
00:08:06.45
nuno maduro
That's right. That's right. um Just on the topic of the Microsoft situation, I kind of feel like they actually, they have a bunch of good tooling now. Microsoft have just changed this mentality of actually shipping good software in being open about software too.
00:08:15.57
Chris Morrell
Yeah.
00:08:20.70
nuno maduro
I mean, TypeScript is probably the biggest the biggest example.
00:08:21.59
Chris Morrell
Yeah.
00:08:24.17
nuno maduro
um
00:08:25.10
Chris Morrell
TypeScript, VS Code.
00:08:25.27
nuno maduro
ah Playwright is, oh yeah, VS Code, of course, now being a default editor for many people. um And, um you know, I'm ah i'm honestly um just happy that they they actually also open source Playwright because I do truly feel that it's just is so good.
00:08:42.25
nuno maduro
Like, and even and then even on this quest of migrating Playwright to PHP, and I have to tell you about that because that's another story too. Yeah.
00:08:49.95
Chris Morrell
Okay.
00:08:50.84
nuno maduro
And on this quest, i I just noticed that they're actually super, you know, they have Playwright for Go, for Python, for Rails. And also like, dude, like 80% of the work I have done on this migration of Playwright to PHP was guessing the API because the internals, I'm using literally the internals to write a PHP SDK for Playwright.
00:08:59.91
Chris Morrell
um
00:09:17.84
nuno maduro
And none of it was documented.
00:09:18.15
Chris Morrell
Okay.
00:09:20.24
nuno maduro
um So I spent like do days and days together with actually some people. Puyapal is one of them. Do you know Puyapal?
00:09:28.53
Chris Morrell
Mm-mm.
00:09:29.49
nuno maduro
You don't know? It's um is this buddy of mine who is working on with me on many, many projects like Pinkery and now Passport 2. And we had to literally decode things.
00:09:41.27
nuno maduro
Go and the way Go and Python are using Playwright to kind of have that same style on PHP.
00:09:45.35
Chris Morrell
Yeah.
00:09:48.06
nuno maduro
So we have to guess many ah things to be able to build this SDK. But on that topic, so the way it works, if you want to get into the details, um is that you know a Playwright has this server mode.
00:10:02.43
nuno maduro
let's Let's call it that way. um In the server mode, here's to a specific protocol, and that's the protocol we had to guess.
00:10:09.12
Chris Morrell
know yeah
00:10:11.30
nuno maduro
And the way we communicate from PHP is through WebSockets.
00:10:16.82
Chris Morrell
Yeah.
00:10:17.20
nuno maduro
and Okay? That's partly the reason why this is actually so fast and feels so native. It's because it's actually fast behind the scenes. We are literally using...
00:10:25.32
Chris Morrell
yeah
00:10:26.68
nuno maduro
interacting with ah the with a Playwright server, just like JavaScript does, just like Python does, just like Ruby does, but we are doing in PHP and we are communicating through WebSockets.
00:10:33.66
Chris Morrell
yeah
00:10:37.47
nuno maduro
Now that WebSockets communication obeys to a specific protocol that was not documented. So we had to guess all the entire thing to be able to build an API on top of this.
00:10:49.48
nuno maduro
And yeah, so, you know, once it was done, and I was like, holy shit, like we corrected it, you know, it's working. All right.
00:10:56.69
Chris Morrell
Yeah, that's pretty gnarly. like I didn't realize that you you had to write your own SDK. I assumed you know because of the way that these other tools work um or the the other implementations that connect with PHP, they're essentially just like communicating with some intermediate process that then actually sends the commands. Right? so
00:11:19.27
nuno maduro
right
00:11:19.39
Chris Morrell
In the case of Dusk, Dusk needs Chrome driver to be running. And then it it's communicating with Chrome driver, which is then communicating with Chrome. I mean, I guess it's a little bit the same, but it sounds like you're kind of operating at a lower level than these other tools.
00:11:33.47
nuno maduro
Exactly.
00:11:34.60
Chris Morrell
Yeah, that's awesome.
00:11:35.28
nuno maduro
yeah Exactly. i I think like the biggest difference, if you if you want to compare it a little bit with Dusk, is that Dusk, we have this thing in between, call it PHP web driver or whatever, which is effectively the SDK of the underlying tool being used by Dusk.
00:11:46.99
Chris Morrell
Yep.
00:11:50.45
Chris Morrell
Yep. Yep.
00:11:52.82
Chris Morrell
yep
00:11:52.94
nuno maduro
While if I wanted to have playwright, and for me, that was a must ah because I wanted to build on top of modern tooling, on top of things that I know that are actually working in 2025. I needed, I wanted playwrights. So I had to literally build everything from scratch. And, you know, that story actually began here on live stream.
00:12:12.05
nuno maduro
um the Some of the people here, which I call Nuno Nation on my YouTube channel, they actually saw the very beginnings of this journey. And, um you know, we we literally started ah building this playwright integration. And at some point, Taylor saw a little bit of it.
00:12:29.37
nuno maduro
He was like, um I think you actually have something be here. maybe you want to just stop talking about it and kind of making it a little bit more special to Laracon U.S. And he was right.
00:12:39.95
Chris Morrell
Yeah.
00:12:40.14
nuno maduro
I think like my talk ended up being, you know, ah successful in my in my eyes ah because most of what people were seeing was new. um Do you know what i mean?
00:12:51.70
nuno maduro
And that kind of made the whole effect a little bit.
00:12:52.06
Chris Morrell
yeah I mean, I want to give you a little more credit than that. I think that like, the, the contents of your talk was very interesting. Right. And I do think the splash was very exciting, but I also just want to say, i mean, i i said this to you in Denver and I'm going to say it again, what watching you present is, is really just a joy.
00:13:16.21
Chris Morrell
And I think that, um, yeah I think that you could honestly be showing off anything and it would be like really fun to watch just because you clearly are having fun up there and um ah you're you're just, you're, you're very good at it.
00:13:25.98
nuno maduro
You too kind.
00:13:31.88
Chris Morrell
You're very good at keeping things accessible, ah going fast, but not too fast. ah I mean, i felt like there were moments where you were like typing and zooming and swiping somehow at the same time. i don't even know how you were doing it.
00:13:49.47
nuno maduro
Yeah, it's just... a that it's By the way, it's not natural talent like Caleb Porzio is or Joe T. It's just literally muscle memory. So I just re-Rs like 300 times offstage.
00:14:02.09
Chris Morrell
Yeah.
00:14:02.09
nuno maduro
um and And then it reaches a point where um I can just do it without even thinking, you know? It just comes naturally.
00:14:07.67
Chris Morrell
Yeah.
00:14:08.54
nuno maduro
literally muscle memory. um And you have been speaker as well in Laracon EU. So you know the nerves, you know, what what is going to a Laracon stage is nerve wracking.
00:14:15.39
Chris Morrell
yeah
00:14:20.32
nuno maduro
It's honestly, I don't know why i I do put myself on those situations because i feel I was dying, dude, before Aaron Francis saying, no, no, Maduro.
00:14:25.21
Chris Morrell
Yeah.
00:14:30.94
nuno maduro
i was I was literally dying inside. The nerves was literally consuming my body so much.
00:14:33.85
Chris Morrell
yeah
00:14:36.45
nuno maduro
And you know exactly what this is. So,
00:14:38.50
Chris Morrell
Yeah, I felt the same way. I mean, i was i said it to my wife ah when I got back from Denver. like I don't know why. like why do Why do we put ourselves through it?
00:14:49.22
Chris Morrell
I mean, i it's it is fun, but it's like I was i was glad to have... i mean, you had kind of the perfect spot, right? Because you're like the the first of the day. At least you get it over with.
00:14:58.77
nuno maduro
Yeah.
00:14:59.74
Chris Morrell
I was the first one after lunch, so I...
00:14:59.94
nuno maduro
Yeah.
00:15:03.38
Chris Morrell
I only had to wait half a day in like anxious terror, and then I was able to like ah calm down and enjoy the rest of the event.
00:15:08.17
nuno maduro
Yeah.
00:15:12.51
Chris Morrell
But yeah, it does.
00:15:12.89
nuno maduro
yeah
00:15:13.65
Chris Morrell
I don't think people necessarily understand exactly how much time and energy goes into the preparation. The number of times that you just are sitting in an empty room talking to an imaginary audience, like trying to deliver the talk, but also like keep mental note of the things that you want to change for next time.
00:15:27.51
nuno maduro
dude
00:15:33.35
nuno maduro
yeah yeah it is it is exhausting mentally wise it's so draining like i i know that every time i so i don't only do rehearsals at the end of my day because i know that after that only thing i can do is gaming because i'm just i'm just exhausted you know what i mean
00:15:33.70
Chris Morrell
It's it's exhausting. Yeah.
00:15:49.26
Chris Morrell
Yeah, you're just done. Yeah.
00:15:50.94
nuno maduro
Yeah. um But yeah, just getting back in a little into a little bit of the topic of bronzer testing. So, you know, I remember like when I finished um this SDK with Playwright, um one of the very first things I wanted to do is, there is multiple things I wanted to do.
00:16:08.63
nuno maduro
um One of them being, um you know, making debug more accessible. mean, we can get into that in a second, but also like um I wanted to, I didn't like the API from Playwright.
00:16:20.94
nuno maduro
um because it was too verbose it was kind of leads to flaky tests uh if you don't use it carefully so i wanted to use it i wanted to that api to be um in the written in the way that anyone would not write flaky tests you know what i mean um and i'm gonna give you an example like
00:16:21.38
Chris Morrell
Okay.
00:16:40.93
Chris Morrell
yeah
00:16:45.37
nuno maduro
If you go, for example, to a form, if you click on log me log me in, for example, ah the first thing you see after that is a redirection happening. And then you see the form being displayed, potentially being displayed with milliseconds difference because JavaScript.
00:17:00.36
nuno maduro
And then you see the form being displayed.
00:17:00.58
Chris Morrell
Yep. Yep. Yeah.
00:17:03.27
nuno maduro
Now, if you're not careful, you click on log in. And if you instruct Playwright to type on the input immediately, you would have a failure because Playwright will tell you, well, you trust you you want me to write on this given input, but I don't have the locator yet available. It's not on a page yet.
00:17:19.90
nuno maduro
you know In and your own eyes, you don't see this difference because it's too fast.
00:17:20.15
Chris Morrell
yep
00:17:24.71
nuno maduro
But because Playwright is also fast, ah you will actually see a blank page because of the redirection before the input appears.
00:17:25.26
Chris Morrell
yeah
00:17:31.68
Chris Morrell
Yeah. Yeah.
00:17:33.15
nuno maduro
And for me, this was like not unacceptable, but it just, i have we have as a lot of our developers, you know that we have very little pain for tolerance.
00:17:42.25
Chris Morrell
yeah
00:17:42.18
nuno maduro
um So on this integration with Playwright, the first thing I did was, okay, I need, first of all, a very good API to work with. And I think Dusk has an amazing API in terms of Naming of methods, that's actually a very good API. So I loved it.
00:17:58.67
nuno maduro
So I just literally poured the entire API to use Playwright behind the scenes. That's the first thing.
00:18:03.69
Chris Morrell
Yeah. Hmm.
00:18:04.46
nuno maduro
But then I've built an internal system of retries that basically prevent flackiness completely. Because if you attempt to locate, for example, a given input and it's not there yet, it will just retry it.
00:18:22.27
nuno maduro
And we'll ask Playwright, is it already there? Playwright will tell you, well, not yet. I don't know what's happening, but it's not yet there. And it will basically keep retrying, meaning that once the redirection is over, once React boots, once does it does its own ticks behind the scenes and the form actually gets displayed, Playwright will be there to catch the input and actually type the elements.
00:18:43.24
Chris Morrell
Hmm. Hmm.
00:18:43.40
nuno maduro
And I build this in the way that every single method you may be maybe using, things like type, press, click, ah drag, all those things will be retried if Playwright cannot locate them.
00:18:57.94
nuno maduro
And I think this is a this the value of this retryer retriable system is actually very good. So I just literally added browser tests to Cloud, to Laravel Forge, to you know to other projects of mine, and there is no flackiness at all. It just works.
00:19:15.00
Chris Morrell
That's awesome.
00:19:15.18
nuno maduro
So that's one of the things, yeah.
00:19:15.40
Chris Morrell
is Is that something that ah if you want to, you can dig into and configure? like if you're If you're trying to sort of write a test for a situation where you want to account for, ah where where you don't want the test to be resilient because you're trying to test a scenario that you don't that you want to ensure isn't sort of flaky under the hood, is there a way to sort of like opt into a more dr
00:19:43.25
nuno maduro
um No, well, not at the moment, but I could potentially do it.
00:19:43.38
Chris Morrell
mode
00:19:46.88
nuno maduro
Something you can do at the moment is configure the timeout, meaning that um in some of these actions, like typing on input, you there is a timeout on this.
00:19:51.48
Chris Morrell
Yeah.
00:19:57.26
nuno maduro
So Playwright at some point will tell you, well, I've attempted to locate this input, but I was not able for the last five seconds, so I'm going to stop.
00:20:05.76
Chris Morrell
Yep.
00:20:05.83
nuno maduro
So that timeout is configurable. So we'll keep trying until timeout expires.
00:20:07.98
Chris Morrell
Yeah.
00:20:10.16
Chris Morrell
yeah
00:20:10.19
nuno maduro
But um I don't think I have built a way of not retrying at all. And honestly, i think that people don't want that. People want to be able to just that to just work behind the scenes.
00:20:19.86
Chris Morrell
Yeah, it's it's probably, yeah. Okay, I actually want to step back ah further for a second because i think I think that one of the hardest parts of writing browser tests or one of the most painful parts of writing dust tests um for me was not necessarily the the test runner. wasn't necessarily Chrome Driver or Selenium or whatever it is. Yeah.
00:20:44.90
Chris Morrell
It was the fact that you had to spin up a separate server, right? um
00:20:48.61
nuno maduro
right
00:20:49.50
Chris Morrell
And that was that was actually mostly the thing that I focused on and when I was trying to solve this myself. um And I think that...
00:21:01.05
Chris Morrell
The fact that you have to run PHP Artisan Dusk instead of just running your tests regularly, the fact that ah you know Dusk under the hood has to copy in a special ENV file over and then copy it back at the end, ah the fact that you can't use refresh data database or do any of your normal test setup stuff, like those were such high pain points for me.
00:21:14.00
nuno maduro
Yeah.
00:21:24.63
Chris Morrell
And I feel like...
00:21:24.82
nuno maduro
Absolutely.
00:21:26.91
Chris Morrell
um you know, that solving that problem seems like the biggest breakthrough here. um So I don't know. i Let me tell you a brief story of the the ways that I tried to solve this that didn't work.
00:21:43.88
Chris Morrell
um Because probably two, maybe two years ago, I worked on a package that I called Dawn, um where essentially i Tried to spin up a bunch of like sub processes from the dust from inside of my test run ah inside of the test runner where it's essentially.
00:22:06.59
Chris Morrell
Spawning Chrome driver in one process, spawning a special separate web server that we're going to intercept the tests in a separate process. spawning a third process to manage the Chrome driver because the problem with the problem with that web driver implementation that you were talking about ah that Dusk uses is it's fully synchronous.
00:22:26.73
Chris Morrell
So if you need to pause execution to let your test continue to run, you can't. um And I went down this crazy path of but basically passing JSON over standard in and standard out to communicate with all these processes.
00:22:42.50
Chris Morrell
um And technically it worked, but it was actually slower than dusk because of all the IO. And ah it just felt bad, you know?
00:22:55.08
Chris Morrell
So after basically building a fully working ah asynchronous Dusk alternative, I just kind of walked away from it because it was like, what's the, if this isn't faster than Dusk, what's the point?
00:23:05.90
Chris Morrell
You know? um Probably... I don't know when, but many, many months later, I like was talking with someone about, like oh, here's this funny story of this thing that I did that didn't work out. And as I'm having the conversation with them, as I had this like aha moment of, oh, well, if we just rewrote some of the web drivers internals to make them work inside of something like an event loop,
00:23:39.66
Chris Morrell
Maybe there's a way to do it. And i I realized, oh, this is like, if you use something like ReactPHP and an event loop, um this is totally possible.
00:23:52.34
Chris Morrell
um And it's something that is... technically possible to do with Dusk because of that. But the the problem is you still have all the other problems that you mentioned, like all all the flakiness and sort of like weirdness around Chrome driver ah or Selenium implementations.
00:24:09.42
nuno maduro
Mm-hmm.
00:24:12.43
Chris Morrell
you know Ultimately, i have I have a PR open right now against Dusk that's like, this is a way to do it. um But the people who i've I've seen try to use it on like really big dust tests,
00:24:23.98
Chris Morrell
they just run into weird issues and I'm like, I don't, I don't know how to solve that right now. I don't have the time. Like it is what it is. um So I'm curious, like what was your approach to addressing? And i' we may even need to talk a little bit more.
00:24:39.98
Chris Morrell
I'm not sure um if I'm describing the problem super well because it's this weird technical limitation that's not exactly straightforward, but is is what I think makes PHP-based browser testing so unpleasant to use.
00:24:56.62
nuno maduro
Yeah.
00:24:56.76
Chris Morrell
um So I don't know if if you feel like i've I've described the problem well enough or you want to take shot at it.
00:25:00.89
nuno maduro
yeah yeah No, no, you described the problem well enough. And it's funny because um your journey trying to solve you know the fact that it is two separate process is very similar to my journey.
00:25:13.98
nuno maduro
So I'm going to just share a little bit about the story and how did I solve that problem.
00:25:14.51
Chris Morrell
Yeah.
00:25:17.66
nuno maduro
So you know once I was done with this SDK Playwright and I have built this whole dust API on top of it with this retriable system, um We reached a point where we were kind of happy with the solution, um but I was not truly happy because, just like you said, ah you know I wanted to enjoy a little bit of this goodiness that Laravel gives me, things like notification fake, queue fake, or being able to assert that something was um you know ah someone who was logged in at the end.
00:25:47.88
nuno maduro
And funny enough, ah just before that, ah funny enough, the way I have built it, before all this event looping story, was actually also doing what you said.
00:25:58.57
nuno maduro
I was literally spawning a separate process for each one of the... for each one of the parallel modes, because I forgot to talk about ah talk about this, but literally parallel mode is also something I wanted to unlock.
00:26:11.17
nuno maduro
So was, you know, spawning a separate HTTP process for each one of the parallel workers in setting the environment variables through the others. So this is like all this old magic situation behind the scenes.
00:26:22.02
Chris Morrell
Yeah.
00:26:22.77
nuno maduro
So the environment variables would go through the others of the request and then would be kind of unpacked by that that separate process and, um you know, been ah set up in system before handling the actual request.
00:26:39.44
Chris Morrell
Yeah.
00:26:39.39
nuno maduro
So this was my original solution, actually. i mean, play this worked, ah I would say, for a month like this. um And it was working quite well, meaning that parallel testing was working.
00:26:48.57
Chris Morrell
Yeah.
00:26:49.64
nuno maduro
So unlocked the speed I wanted. um It was fast already. But again, for two things, was not good enough. and The first one is that it wasn't using it wasn't well integrated with Laravel, just like Laravel does not.
00:27:02.89
nuno maduro
ah So you couldn't use ah notification fee fake and all those goodning goodies that Laravel gives you. But at the same time, debugging still felt like crap. You know, especially when you move it to GitHub Actions, it would feel impossible to debug anything really.
00:27:13.37
Chris Morrell
Yeah.
00:27:19.14
nuno maduro
Because the only thing you would have is a screenshot.
00:27:22.12
Chris Morrell
Yeah.
00:27:23.26
nuno maduro
you know You have a screenshot and a timeout, and dude, it's just it's just a nightmare.
00:27:28.16
Chris Morrell
It's a nightmare.
00:27:28.32
nuno maduro
you know And I was literally talking about this.
00:27:28.91
Chris Morrell
Yeah.
00:27:31.29
nuno maduro
um with the We have this Slack channel at Laravel, which is the framework channel. And you know I was saying we have this very fun thing here, and it's fast. and However, kind of still feels like crap when I'm trying to deploy.
00:27:44.84
nuno maduro
when i'm trying to deep Debugging use Laravel. And you know that's why I sent you the pull request yesterday, because that pull request you are saying that you have made a POC of Dusk was shared to me by Tim McDonald.
00:27:59.16
nuno maduro
And he told me, dude, you might actually want to look into this idea of Chris Morrell, because I think maybe he has something interesting on it. And I start looking and...
00:28:10.88
nuno maduro
And I looked to the way you approached this, which was with event source with event looping. And the way you did it is actually super interesting. And it's kind of what I'm doing now using a different project because you were using ReactPHP and I just switched to AMPPHP.
00:28:28.25
nuno maduro
But the philosophy behind this is, okay, I'm going to assert if something happens. It actually matched very well with the retribable system I have, which is I'm going to assert if something yeah i'm going to assert if something happens.
00:28:36.56
Chris Morrell
I can imagine.
00:28:40.35
nuno maduro
and If it didn't happen already, let me free the process. So it goes to the HTTP server, which is now in the same as one as the test, and...
00:28:53.66
nuno maduro
just check if there is any request to be processed. And if it is, just keep processing them. And once you are done, come back to the assertion. Is it already happy?
00:29:01.60
Chris Morrell
Yep. Yeah.
00:29:01.93
nuno maduro
Oh, not yet.
00:29:02.56
Chris Morrell
yeah
00:29:03.14
nuno maduro
Go back to the HTTP process and just keep a serving request. And, you know, this kind of solved the problem, like literally. So from that point, that from that point um We literally allow it to you to use things like QFake.
00:29:21.83
nuno maduro
There was a bunch of problems after this, by the way. like um um you know For example, I have to come up with this layer on top of um every single request that flushes the state like ah Octane does.
00:29:33.50
Chris Morrell
Yep. Yep.
00:29:35.35
nuno maduro
ah So I kind of inspired myself a lot on Octane to do that too. Flush the state between requests, but also like, oh, dude, there was this this issue. like So basically, like if you are using Inertia and you have a real app,
00:29:48.66
nuno maduro
and Changes are that Inertia actually have hard-coded URLs on the JavaScript, so which werere targeting which were targeting the server that build the assets.
00:29:55.45
Chris Morrell
Okay.
00:30:00.63
Chris Morrell
Yeah.
00:30:01.04
nuno maduro
But the server that you want to target is depends of the parallel worker serving the request. So i had to hijack like the content being served to, if you find the URL, just replace with this one being used by the parallel worker.
00:30:09.06
Chris Morrell
Yeah.
00:30:16.41
nuno maduro
So... Yeah, that is like hacks like this all over the place. ah Either that be the, you know, this small thing behind the scenes or there's a bunch of shit like this, basically.
00:30:21.13
Chris Morrell
yeah
00:30:28.09
nuno maduro
But, you know, that event loop story literally unlocked ah what I wanted for debug, but also for integrating well with Laravel of being able to have the same...
00:30:39.95
nuno maduro
the same process serving the test in the HTTP server. So if you were to fake things or mock even things, eat that that same thing will be reused.
00:30:50.05
Chris Morrell
It just works. Yeah.
00:30:51.36
nuno maduro
It just works. Yeah, exactly. um you know And it kind of worked for a bit until I actually moved this into real projects because real projects, you start seeing like all this weirdiness.
00:31:04.86
nuno maduro
All of this weirdness, it concerns the state because if you, for example, if you go to Vapor today, which is a heavily JavaScript application that uses Vue.js and that is doesn't use Inertia.
00:31:05.23
Chris Morrell
Yeah.
00:31:18.34
nuno maduro
So actually every time you boot the page, it just spawns like five different requests to fetch um information. So those five different requests would target the same server and you cannot have state in between that is leaked or whatever. So, you know, there is a bunch of little things like this, but indeed, man, that event looping story that you initially um ah described as a POC, it was a great idea that sparked kind of all this better debug story and better integration with Laravel.
00:31:49.81
nuno maduro
um You know, you you had great ideas on there. um I think, like, one of the things that I solved recently was not using ReactPHP, which I don't know if you noticed, but it just feels like not...
00:32:04.08
nuno maduro
um just not have been up to date recently.
00:32:08.32
Chris Morrell
Uh-huh.
00:32:08.34
nuno maduro
And there, you know what i mean?
00:32:08.49
Chris Morrell
aha
00:32:10.01
nuno maduro
And there is a few libraries that are just ah not compatible anymore. um So recently, like I just rewrote the entire thing on aim.php. um Are you familiar with it?
00:32:20.94
Chris Morrell
I've heard of it. um I feel like that's the first one that um started to embrace fibers when they came out. So that was kind of the the thing that seemed interesting about it.
00:32:29.67
nuno maduro
Yeah.
00:32:32.57
Chris Morrell
But I remember when I first saw it, it was like, well, you know in a couple of years, I'll take a look at it because it's it felt very, very bare metal at the time. is it Has that ecosystem expanded a lot?
00:32:43.57
Chris Morrell
I haven't looked at it since then.
00:32:44.94
nuno maduro
ah Yeah, so is it actually works. the It really works good, honestly. i feel it works even better than ReactPHP at this point because ah it's based it's based on fibers.
00:32:53.16
Chris Morrell
Okay.
00:32:55.81
nuno maduro
It has little to no dependencies whatsoever. So that literally unlocked me.
00:32:59.72
Chris Morrell
Yeah, that's great.
00:33:00.65
nuno maduro
um You know what I mean? It allows me to install that on any Laravel application. um But also like if the API, it's a little bit less complicated than ReactPHP, where if you want to do, because on my case, I wanted to combine an asynchronous API, which was the event server or the HTTP server with a synchronous API, which is assertions.
00:33:13.16
Chris Morrell
Okay.
00:33:25.33
nuno maduro
So I had to literally jump in between serving requests and go back to this synchronous state.
00:33:25.71
Chris Morrell
Yeah.
00:33:32.64
nuno maduro
And with actually, with the AMP PHP, it just works almost natively. um Where with ReactPHP, we would have to come up with all these weird functions like ah you know just, um I cannot remember, but like just do that.
00:33:45.94
nuno maduro
if If it's anything, stop there and then come back. It just um it was complicated.
00:33:50.57
Chris Morrell
yeah
00:33:51.01
nuno maduro
um And AMP PHP felt a little bit more natural.
00:33:54.63
Chris Morrell
That's cool. Yeah. I mean, looking at the, just looking at the docs right now, I see that they have a ton of packages that cover like web sockets and Redis and, ah HTTP servers and all, you know, all the things that you would need for a project like this. So that's, that's awesome.
00:34:11.79
nuno maduro
Oh, yeah. And they also, like, um allow me to rebuild the old WebSockets story, too, because the WebSockets, back then when I was building this with ReactPHP, it was still blocking, meaning that i would make um I would make, for example, a request to Playwright, and I would have to literally wait for the response.
00:34:33.05
Chris Morrell
Yeah.
00:34:34.07
nuno maduro
And... um
00:34:34.69
Chris Morrell
But with this, you can just you can use their WebSocket client.
00:34:38.17
nuno maduro
yeah ah Exactly. So the MPHP gives me an event looping WebSocket, meaning that it will literally send a request, jump back to the event looping system, just to whatever is an event loop, and then get back to the WebSocket story.
00:34:39.90
Chris Morrell
That's cool.
00:34:51.89
Chris Morrell
Yeah.
00:34:52.15
nuno maduro
um So I also unlocked that and just became much much faster, actually, past PHP because of that.
00:34:57.64
Chris Morrell
That's awesome. I think, okay, before we go too much further, i think you you and I, I get the sense that you and I have been deep in in these weeds long enough that maybe ah we're we're glossing over some of the details.
00:35:11.75
Chris Morrell
So I want to talk briefly about event loops and briefly about sort of the...
00:35:12.81
nuno maduro
Yeah.
00:35:17.42
Chris Morrell
the um memory issue around the way Dusk operates. So let's let's start with that. if you If you're familiar with the way Dusk works,
00:35:28.96
Chris Morrell
um The reason that Dusk has all these limitations and the reason why Dusk does all the things that we talked about, copying ENV files and all of that, is essentially because of a single sort of restriction, which is ah your test is synchronous. right When you write a test, it starts at the top of the test and executes it synchronously to the end.
00:35:56.58
Chris Morrell
But in the case of ah a browser test, there are lots of things that need to happen in between those, like ah between the assertions or it even between like the setup.
00:36:06.14
nuno maduro
Hmm.
00:36:08.56
nuno maduro
Mm-hmm.
00:36:10.53
Chris Morrell
So like when I request a page in a browser that might spawn six other requests for assets or, you know, JSON endpoints or anything else.
00:36:17.64
nuno maduro
Mm-hmm.
00:36:20.34
Chris Morrell
Right. And all of those things. need to be handled before the next assertion runs. And so in Dusk, ah what that means is you need to spawn a separate browser, so that the a separate server, excuse me, so that that server can handle those all all the requests that need to be handled before the next assertion runs.
00:36:41.94
Chris Morrell
um what that ah What that means, though, is all of the things that we're used to running our Laravel tests, where we can sort of set up the world ahead of time and then run our assertions, are no longer possible. Because when you set up the world, say you do Q fake or notification fake or whatever it is, all that's doing in Laravel is it's swapping out the notification driver with a with a fake driver in memory in your test.
00:37:10.96
Chris Morrell
ah That doesn't have any impact on the separate web server that Dusk spins up.
00:37:11.08
nuno maduro
Yep.
00:37:15.74
Chris Morrell
um And that's also why you can't use the refresh database trait because ah in in a regular test, the way refresh database works is it it seeds it ah migrates the database once the beginning, and then it runs your tests inside of a transaction and rolls the transaction back between each each test.
00:37:20.82
nuno maduro
yeah
00:37:35.61
Chris Morrell
um So all of the data that's visible in memory in your test is inside of a transaction that's not available to an outside process, which is why there's all these weird endpoints in Dusk to like force a user to be signed in or like to sort of jump past things.
00:37:45.92
nuno maduro
Yep.
00:37:51.28
nuno maduro
Yeah.
00:37:53.46
Chris Morrell
um Those exist basically to work around the fact that these two things are two totally separate memory footprints that can't talk to each other.
00:38:02.99
nuno maduro
Yeah.
00:38:03.74
Chris Morrell
um And so, yeah, go ahead.
00:38:05.00
nuno maduro
And maybe and maybe we can you can expand a little bit on the why database transactions is a problem. Because at scale, that would be a problem for me too. ah With something like Laravel Cloud, with hundreds of migrations, using database transactions was just impossible at scale with many bronzer tests.
00:38:23.22
nuno maduro
um So um being able to use refresh database, it just, again, unlocks being able to use bronzer testing at scale.
00:38:31.51
Chris Morrell
Yeah, yeah, yeah, for sure. um And so this the solution that we've kind of both come to ah to to answer this this problem is to use an event loop. um ah you know Anyone who's familiar with JavaScript has probably interacted with an event loop.
00:38:50.92
Chris Morrell
um
00:38:51.06
nuno maduro
And
00:38:51.50
Chris Morrell
They're less common in PHP, although I feel like we're starting to see them crop up more in like modern PHP. If you've used Laravel prompts, it's not using it's not using React or AMP, but it's essentially just a big while loop that does a bunch of stuff inside of the loop um and is constantly rerunning to compute the current state of the terminal UI. right That's like a simple, ah I say simple, ah trust me prompts is not simple, but um it's simple in that it's not using a package to do it.
00:39:29.08
Chris Morrell
um But things like ReactPHP and AMPPHP are essentially very sophisticated event loops for PHP. And what an event loop is, is essentially just a big while statement.
00:39:42.82
Chris Morrell
um And you essentially attach different things to happen inside that loop. right So if you're implementing something like a timer, you're essentially saying, make sure that at least every five seconds this thing happens. And each time the loop ah processes, that's called a tick.
00:40:01.99
Chris Morrell
And like a timer is essentially just going to say, all right, on each tick, like has enough time passed? If not, just keep on going. If so, then execute the callback that I was given. right That's timer.
00:40:12.89
Chris Morrell
that's a timer But the thing that event loops really unlock in PHP is much of our code is just waiting on things. It's waiting on IO.
00:40:23.65
nuno maduro
Oh yeah.
00:40:24.74
Chris Morrell
It's waiting on something where, you know, with this web socket or HTTP server stuff, it's like data is just coming across the this like socket and we just have to wait for all of it to come through.
00:40:36.94
nuno maduro
Yep.
00:40:37.39
Chris Morrell
yeah, when you're talking about synchronous code, your code is just sitting and waiting and hoping that like the request is going to finally come through so it can operate on it.
00:40:48.71
Chris Morrell
um What these like more sophisticated event loop packages provide is ah tooling around, okay, here's an implementation of an HTTP server that, um,
00:41:03.71
Chris Morrell
offloads the IO so that when we're waiting, the event loop can keep on running and it's just going to check in and like sort of when all the data has come through, then it'll continue processing.
00:41:16.51
nuno maduro
Yeah. Mm-hmm.
00:41:17.59
Chris Morrell
um And that's really the thing that unlocks a lot of this capability because you can essentially fake parallel processing by, by letting two or 10 or a hundred separate, like IO bound things run in the background and just check in on them inside of all these ticks until one of them comes back and then you process it. And then another one comes back.
00:41:43.02
Chris Morrell
Um, And that is, i think that's like the thing that makes ah the the sort of faux parallel operation.
00:41:53.94
Chris Morrell
um And it's not even faux anymore with fibers. Like fibers actually lets you um do some multi-threaded ah operations in PHP. But as developers, we don't have to think about it. You can just pass it a callback and say, hey, when you're ready, call this. Or you can build up a server and say, hey, when you have a full request, give it to me. you know And the loop can just keep on running ah with a bunch of these listeners on it.
00:42:20.33
Chris Morrell
um does that Does that feel like it it gets us caught up?
00:42:24.10
nuno maduro
Yeah, it was ah it was a great explanation about what is event looping. And it's kind of crazy if you think a little bit, like every time we are on PHP and we do ah you know a SQL query, for example, that takes, ah let's say a second, you have literally 300 megabytes allocated to this process waiting for the query.
00:42:45.20
nuno maduro
but
00:42:45.35
Chris Morrell
Yep.
00:42:45.85
nuno maduro
And we never think about that. But ah if you think a little bit about this, it's actually like, holy moly, like we have this all this compute power. and it's most of its time, if not 99% of this time, because of the way PHP is built, is just waiting.
00:43:01.48
nuno maduro
It's doing a query to...
00:43:01.65
Chris Morrell
It's just waiting.
00:43:02.87
nuno maduro
It's just waiting, like doing a query to MySQL and it's waiting. Then it's doing a query to the Blaine Engine compiler or whatever, then it's waiting. Then it's fetching a file from the system, then it's waiting. And again, just like you described, what these tools do is that they give you underlying...
00:43:17.86
nuno maduro
functions that instead of, ah wait, instead of making SQL query and just staying there waiting, just use this one. And this one will just come back to you when it's ready. And, um you know, I think I have seen on the, on the internet a little bit, these illustrations about the restaurant menu thing where instead of having, you know wait for each person cooking its meal, um you have this single manager, which is the event loop and kind of checks on on them every single time on the tick.
00:43:46.45
nuno maduro
But, um,
00:43:46.88
Chris Morrell
Yeah, that's a good way think of
00:43:47.56
nuno maduro
ah But yeah, man, yeah, but yeah, man, that, that ah you know, but using event looping was kind of one of the big unlockers for this debug and integration story. and But at the same time, unlocked many other things, like not using database transactions, which again, at scale, it's just not feasible.
00:44:07.36
nuno maduro
um ah What else? um Yeah, that was it for, you know, debugging integration, kind of made the whole story there. That was a good one.
00:44:16.63
Chris Morrell
So the the thing that I'm curious about, i ive I've never looked into playwrights ah parallel testing. how does How does that work? how does that How does that work under the hood and what's how does it play into the implementation and in past
00:44:27.35
nuno maduro
Great question.
00:44:32.35
nuno maduro
Yeah, great question. So the way works is that, that um so again, Playwright is running on this worker mode, and that worker mode is the same worker mode for each one of the parallel processes. So it's just one part is' just one worker mode, basically, serving all the workers that we have on past PHP.
00:44:51.82
Chris Morrell
Okay.
00:44:51.75
nuno maduro
And the way it works is that you work with identifiers, basically. So you say, I want to spin a new Chrome browser, And Playwright will tell you, OK, let me spin that chome Chrome browser for you.
00:45:02.43
nuno maduro
This is the ID. So no matter what you do inside of that single Chrome browser, this is the ID that you need to use. And I will store that ID on that parallel process. And then I have another parallel process from past doing another test, which potentially might be on Firefox or WebKit.
00:45:20.11
nuno maduro
And that tells Playwright, oh, I need another browser. And Playwright will tell you, here we go. i have now a Firefox ready for you. This is the ID. So it's a single work it's a single worker in Playwright serving all these parallel modes of past.
00:45:35.33
nuno maduro
And the way they communicate is over a given unique ID. ah So it's just native parallel mode behind the scenes.
00:45:39.36
Chris Morrell
Mm-hmm.
00:45:41.72
nuno maduro
And but you know of course, Playwright um you know ah behind the scenes itself has its own way of being performance performant with all these browsers.
00:45:52.11
nuno maduro
So you can spin like hundreds of browsers if you want to. um And you have to deal with a bunch of so ah a bunch of things here. Like you need to clean up resources. um So if you open a session, you need to close a session. If you open a browser, you need to close a browser. And if I'm not careful, it will end up all these browsers being hanging in the background, even if I finish a test suite.
00:46:13.61
nuno maduro
Because it's literally a separate PlayRod worker around this. so um So there is all that deal to handle. But I really like... That's the way Playwright works in parallel mode. ah Works with IDs, and it's just native. it's it's It's parallel mode by default, basically.
00:46:30.65
Chris Morrell
Okay. And then I'm actually not sure is, is pests parallel mode using paratest under the hood or is it your own implementation?
00:46:40.30
nuno maduro
Correct. Past parallel mode uses palette test behind the scenes. And the way palette test works is that it's kind of simple.
00:46:45.34
Chris Morrell
Okay.
00:46:47.76
nuno maduro
So um past so the way it works from the beginning is past boots, let's say the the process of past, let's call it this way, or boots PHP unit.
00:46:58.81
nuno maduro
And it reaches a point where, okay, do we have a dash dash parallel flag? And um ah the terminal will tell me, yes, you do. And I'm going to say, wait a second. Instead of running PHP unit, I'm going to run Paratest instead.
00:47:14.47
nuno maduro
And what Paratest does is spawning various processes depending on the number of CPUs that you have. So if you have 14 CPUs, you will spawn 14 parallel CPUs.
00:47:27.78
nuno maduro
processes. um And then you will communicate in a very performant way between the main process or the parent process, let's call it this way, and the child processes and deliver one test one by one to these various workers.
00:47:43.39
nuno maduro
And those very workers will communicate with the single play right worker mode, which is already spawned in advance um by the Bronzer testing plugin.
00:47:51.36
Chris Morrell
Yeah.
00:47:53.98
Chris Morrell
So are you able to use the paratest process token as the ID for a playwright, or do you have to do something to sort of keep those in sync?
00:48:04.53
Chris Morrell
Yeah.
00:48:04.94
nuno maduro
um Yeah, so great question. So basically like um the way that, so once the once we are on the parallel mode already, so imagine that we have 14 processes, let's talk about a single ah a single one of those 14.
00:48:15.39
Chris Morrell
yeah
00:48:18.28
nuno maduro
Every single one of them will spawn its own HTTP server to serve Laravel requests. um you know So if a task needs ah an HTTP server to serve requests, you will have one.
00:48:32.90
nuno maduro
And um you know if you type visit, ah which is the function I am giving you to allow you to interact with a browser, that will spawn a process. And we do that will spun a browser in that browser will target that same HTTP server that works only for this parallel worker.
00:48:51.22
Chris Morrell
Yeah.
00:48:51.55
nuno maduro
um So it kind of you know uses the full power that we have because right now we have very expensive laptop laptops. And I assume you have i assume you have one too. and And back in the days with something like Latabell Dusk, you were using one CPU only.
00:49:05.29
nuno maduro
And you have probably like 14.
00:49:05.68
Chris Morrell
Right.
00:49:08.40
nuno maduro
So this literally unlocks being able to use all the power that you have. And that's why on Latacon stage, I went from 10 seconds to two seconds only.
00:49:19.01
Chris Morrell
Yeah.
00:49:19.42
nuno maduro
and
00:49:19.99
Chris Morrell
I mean, it's incredible.
00:49:21.55
nuno maduro
Yeah, but that honestly, that was not a good demo because I could have made it a little bit more um spicy if I wanted to. Because if i keep adding more tests, like if I had a like 100 tests, for example, there you will really see the difference because we would wait minutes for Dusk.
00:49:38.65
nuno maduro
And because we have 14 parallel workers, plus being on top of Playwright, which is by default is already twice faster, just You would see it like the thing being over in yeah, all compounds exactly.
00:49:46.57
Chris Morrell
Yeah, it all compounds.
00:49:49.44
nuno maduro
It would be the thing being over in four seconds or five seconds, and you would have to wait three minutes for dusk.
00:49:52.95
Chris Morrell
Right.
00:49:55.79
Chris Morrell
That's wild.
00:49:55.72
nuno maduro
um
00:49:56.82
Chris Morrell
Yeah.
00:49:57.05
nuno maduro
Exactly. And that's why I think like there's all this parallel mode story really unlocks being able to use o ah bronzer testing at scale, which is exactly what I wanted, is when the things would fall apart is when I had more than 10 tests.
00:50:09.52
Chris Morrell
Yeah.
00:50:14.28
nuno maduro
So I wanted to be able to come up to Laravel Forge, being able to write 100 tests and not having to wait 30 minutes for the CI.
00:50:14.45
Chris Morrell
Yeah.
00:50:22.70
Chris Morrell
Yeah.
00:50:22.65
nuno maduro
And the parallel mode plus Playwright, because Playwright, it's literally twice faster by default already. um I don't know how they what they do behind the scenes, ah but it is.
00:50:29.04
Chris Morrell
Yeah.
00:50:32.25
nuno maduro
If I run past ah right now without being in parallel, will already be twice faster.
00:50:38.68
Chris Morrell
Yeah.
00:50:39.21
nuno maduro
um So you know all these compounds, and again, it i have like the bronzer. So the the test suite that I have for this plugin is 400 tests.
00:50:51.15
Chris Morrell
Okay.
00:50:51.22
nuno maduro
And if i if I remove all the sleeps I have here and there, it will run the entire thing, 400 tests in like six seconds.
00:51:00.42
Chris Morrell
That's a wild. I mean, anyone who has done anyone who has done any browser testing, any dust, any dust test suite at any reasonable size.
00:51:01.63
nuno maduro
It's well, right? And I want to ask you, yeah.
00:51:12.23
Chris Morrell
If you, so when, when you just did that first, just the first demo, right. Where you swapped out this browse with visit, um, just how fast you got the response back was kind of mind blowing.
00:51:23.68
nuno maduro
Yeah.
00:51:25.11
Chris Morrell
Right.
00:51:25.51
nuno maduro
Yeah. Feels like a feature test almost.
00:51:26.08
Chris Morrell
ah but Right, right. It's, I mean, it does. It unlocks. You just don't have to be so stingy with like the, the browser testing situation anymore. You can just, if you want a browser test, you just write a browser test and it's fine.
00:51:41.56
Chris Morrell
You know, that's, that's incredible.
00:51:43.94
nuno maduro
which Which leads me to to a question to you. like When you organize ah your test suite, um I assume you have like potentially a bunch of unit tests, but you also have feature tests, right?
00:51:57.01
Chris Morrell
Yep.
00:51:57.95
nuno maduro
So do you see yourself keep using feature tests from this point? like i Assuming that you are a past user.
00:52:06.51
Chris Morrell
Um, I mean, i think that I, ah we, we, we do very few unit tests. Uh, we do almost all feature tests and I would see us, uh, like I would see us continuing to think of almost feature tests as the, the, um, what am I trying to say here?
00:52:32.33
Chris Morrell
Uh, I think that we would end up leaning on browser tests in places that would replace feature tests. And our feature test would be for areas that aren't, um you know, aren't, aren't really browser heavy.
00:52:46.82
Chris Morrell
And it's a little bit different for us because our application is almost entirely just Laravel and blade. It's, we don't do a bunch of client ah heavy work um except for,
00:52:58.74
nuno maduro
ah you don't have JavaScript? OK. All
00:53:00.61
Chris Morrell
You know, we we have parts of the application that are ah that are full-blown React apps, and we have... um some places where there's like pretty sophisticated Alpine interaction happening.
00:53:15.36
Chris Morrell
um
00:53:15.38
nuno maduro
right.
00:53:16.06
Chris Morrell
But for the most part, much of our app is still just full page reload and, and blade templates. um So I don't think I would leave. I don't think I would switch to browser tests for a lot of those, but anywhere, i mean, more and more we're finding ourselves ah writing pretty sophisticated Alpine um components and anywhere we were doing something like that, being able to, to,
00:53:40.43
Chris Morrell
do a browser test would be phenomenal. And i think we're probably gonna be leaning more into inertia and React in the future. And so like this, and this makes that, I feel like between the PEST4 announcement and the Wayfinder announcement, I think that's those two things like push us that much further towards like, oh, we can we can lean more heavily into these like sophisticated browser interactions.
00:53:49.10
nuno maduro
Mm-hmm. Mm-hmm.
00:54:10.03
nuno maduro
here
00:54:10.15
Chris Morrell
um and still have like ah assurance that everything's not broken. Yep.
00:54:17.11
nuno maduro
Right. um Yeah. I feel you like if you are using Blade, probably you know um there is very little of room for actually having bugs on the UI. um But you know if you use JavaScript, like I'm using at the moment for many of the UIs I'm building, um even Livewire, it's JavaScript at this point.
00:54:38.63
nuno maduro
You know what I mean?
00:54:39.74
Chris Morrell
Yeah, for sure.
00:54:39.87
nuno maduro
um I pretty much need bronze attachment to be functional.
00:54:46.25
Chris Morrell
Yeah, for sure.
00:54:46.37
nuno maduro
and And maybe can lead us to the next topic if you want to move a little bit, ah which I presented as well at LadaCon US, um which is smoke testing and visual testing. So, you know, I'm a big fan of something called smoke testing, which is the part of the demo where I was demoing things like, ah you know, these days people to do smoke smoke testing, they kind of just don't do it at all, or just they use this thing called assert status 200.
00:54:59.18
Chris Morrell
Yeah.
00:55:11.63
nuno maduro
which you know with Blade actually might work. You might be okay with it because you can actually assert C things using the native assert C from Laravel. But um with Livewire, Alpine, inertia with React in view, you kind of assert 200 doesn't mean anything. You can literally have a blank page.
00:55:28.80
Chris Morrell
Yep, for sure.
00:55:29.32
nuno maduro
so So that's why I also for this past four playwright integration, I've built these various helpers, which are combined into a single one called assert no smoke.
00:55:40.95
nuno maduro
And they literally tells you as well, if you have JavaScript on errors on the pages, if you have console logs being split out, you know, um and many other ideas that people gave it to me over the next few weeks. um But ah this is something else that I truly believe to be revolutionary in the sense that I can just go to a lot of LCLOUD right now.
00:56:01.63
nuno maduro
I'm going to just grab all of the routes, logged in as Nuno, and just basically just check all of them if I have any JavaScript error or if any of the pages is being blank at the moment. Such an easy test to write.
00:56:11.32
Chris Morrell
Yeah.
00:56:12.29
nuno maduro
And I think like it's also a big value.
00:56:15.20
Chris Morrell
Yeah, I mean, that... i think that Even for a more blade heavy website, doing full browser based smoke testing has a lot of value because you know a good example is we might have like a Google Maps integration on the page or you know a little bit of inline JavaScript here or there.
00:56:34.04
nuno maduro
Oh yeah.
00:56:39.31
Chris Morrell
um Or like the thing the thing that we're dealing with right now is you know our code base is very large. um
00:56:46.68
nuno maduro
Mm-hmm.
00:56:47.40
Chris Morrell
It's hard for us to adopt we we I think as a team, we're very good at keeping the code base modern, but some things are hard to adopt.
00:56:57.99
Chris Morrell
And one good example of that is the the switch to Vite.
00:56:58.28
nuno maduro
Mm-hmm.
00:57:02.54
Chris Morrell
um We have so much custom tooling around like the JavaScript build, ah essentially to implement a bunch of things that now you just get for free with VEAT.
00:57:15.23
Chris Morrell
um
00:57:15.43
nuno maduro
right.
00:57:16.35
Chris Morrell
And unwrapping all of that is very hard. ah And there's a lot of... um There's a lot of just little inline JavaScript snippets around the code base.
00:57:28.97
Chris Morrell
A great example is there's a lot there's a lot of code that just um assumes that ah functions declared in the global scope are available in the global scope.
00:57:40.94
Chris Morrell
But when when ah when you switch to Vite, everything is load loaded as a module, which means that these functions are no longer global.
00:57:41.46
nuno maduro
Oh no.
00:57:47.12
nuno maduro
Oh yeah.
00:57:49.37
Chris Morrell
um And so you know essentially, ah over the last couple of weeks, Bogdan has been just looking at every inline script tag and ah you know adding window dot everywhere that needs to to have it. or like you know And you know a lot of these things, those little inline script tags are not super important. It's a little tiny page that barely anyone ever hits.
00:58:18.39
Chris Morrell
um they're They're not under test. you know testing them Testing that like inline JavaScript was a pain before, and so we just didn't do it. And so something like this, to be able to just say, okay, like now we can just run everything ah before the switch to VEAT and identify there's prop there may be script tags that are broken right now that we would have to fix.
00:58:43.73
Chris Morrell
We fix those, and then when we switch to VEAT, we can just run those tests again ah and know that, oh, that that Google Maps integration, that
00:58:43.80
nuno maduro
Yeah.
00:58:54.66
Chris Morrell
is defining you know a global init map method that you pass into the as a query parameter to the to the Google Maps thing. like All these weird scenarios that you have to deal with, we were just we would see that error right away.
00:59:08.81
Chris Morrell
It would be incredible. So you know I think it's a no-brainer or it should be a no-brainer for anyone.
00:59:10.41
nuno maduro
Yeah.
00:59:15.00
Chris Morrell
um I think it gets a little bit difficult um that with a big app that has lots of routes that are bound to resources, you know you have to do a certain amount of setup to make them even visitable in the first place.
00:59:31.12
nuno maduro
Yeah. I think honestly, willll that that what you just said will be probably one of the most, will be the complaints on day on the very first days of Pass 4.
00:59:33.08
Chris Morrell
ah
00:59:42.44
nuno maduro
Because people think like, I can just add bronzer testing, it will just work.
00:59:42.67
Chris Morrell
no
00:59:46.12
nuno maduro
It will not just work. Because you will put that on GitHub Actions.
00:59:48.31
Chris Morrell
Right.
00:59:50.01
nuno maduro
GitHub Actions doesn't have your Echo credentials or whatever. Bam, it will blow up. GitHub Actions doesn't have, ah you know, some of the things you potentially do locally, but but you don't do it on GitHub Actions because you never need to, and it will just won't work.
01:00:03.69
Chris Morrell
Yeah, for sure.
01:00:05.09
nuno maduro
And um even things like credentials to see Google Maps is one example, you know, because you probably don't.
01:00:10.14
Chris Morrell
yeah for sure
01:00:11.37
nuno maduro
and that's you know So you have all this setup. Like even now, was like today I worked on actually, heading Bronzer test to Laravel Forge. And Laravel Forge, you know a test suite runs on GitHub Actions with ah inertia.
01:00:28.24
nuno maduro
ah And actually, um yeah the very first test I wrote, Bronzer test, just failed immediately because it was missing um all the reverb keys, for example.
01:00:38.76
Chris Morrell
Right.
01:00:38.80
nuno maduro
And I said, oh, OK, I need to have the revert keys.
01:00:38.90
Chris Morrell
Yeah.
01:00:40.72
nuno maduro
And I had the revert keys and there was another key missing. And I think this will be the biggest complaint. however However, for fresh new apps, it will just work immediately. um No problem whatsoever.
01:00:53.25
Chris Morrell
yeah
01:00:53.23
nuno maduro
ah But that will be one of the very first pain points for sure.
01:00:57.28
Chris Morrell
I do wonder if um if this will if we'll see a shift, because I think that right now, my impression is, i could be wrong, but my impression is that most test suites lean very heavily on factories, and and most Laravel test suit suites don't just seed a database up front and then run all their tests on the seeded data, right?
01:01:06.26
nuno maduro
Mm-hmm.
01:01:22.29
nuno maduro
Mm-hmm.
01:01:22.39
Chris Morrell
ah I could be wrong, but that's my impression. And I wonder if we're going to see a shift away from like sort of this just in time factory data uh, investing more time in like having sort of a main seeder that seeds all the test data that your application is going to need, because that will, um,
01:01:49.31
Chris Morrell
that will make it easier to do things like smoke testing, where you will need a ton of different models to exist in different contexts.
01:01:58.58
nuno maduro
Hmm.
01:01:59.65
Chris Morrell
different contexts
01:01:59.87
nuno maduro
Yeah.
01:02:01.20
Chris Morrell
you know
01:02:01.30
nuno maduro
Right.
01:02:02.39
Chris Morrell
Like right now, it's not a problem to do that test by test because I'm just like, okay, I need a user. I'm going to say user factory and I need a you know a team or whatever.
01:02:09.21
nuno maduro
Yeah.
01:02:10.73
Chris Morrell
I do team factory. But if I just want to say, go through the entire app and test everything, now I have to like go through and factory up a million different resources before I before i run the code.
01:02:16.45
nuno maduro
It's not easy, no.
01:02:19.76
nuno maduro
Yeah.
01:02:23.42
Chris Morrell
Whereas if I just had a great seeder, it would just work, right?
01:02:23.38
nuno maduro
Yeah, on Cloud, Yeah, on I feel you. On cloud, I had to use like 30 factories, I think. Literally one by one.
01:02:34.38
nuno maduro
User factory, organization factory, application factory, environment factory, deployment factory.
01:02:34.53
Chris Morrell
Yeah. Yeah.
01:02:40.16
nuno maduro
It was like one by one, like 30 lines of code to be able to actually do my first assertion.
01:02:42.04
Chris Morrell
yeah
01:02:48.75
nuno maduro
And you have not like a lot of people, like the most upvoted issue on PAST at the moment is people asking me, hey, Nuno, how can I use seeders on PAST?
01:02:59.09
nuno maduro
Because actually, it's not that well it's not that well documented. And I think even on Laravel, it's not documented at all. um So people also want some people actually want to seed, just like you're saying, not even not even for smoke testing.
01:03:05.83
Chris Morrell
Okay.
01:03:13.34
nuno maduro
ah but ah But also for um just for regular tests, they want to be able to reuse the same data all the time.
01:03:17.91
Chris Morrell
Yeah.
01:03:20.34
Chris Morrell
Yeah.
01:03:20.28
nuno maduro
i don't Initially, when I saw this, I didn't get it because like if you have 10 files of tests, if you potentially create the user on the very first one, that will impact the second test potentially as a side effect.
01:03:34.65
Chris Morrell
Yeah.
01:03:34.95
nuno maduro
um So I never actually got it. And i I feel like I need to actually use an approach like that on the real project to actually see how does it feel.
01:03:45.00
Chris Morrell
Yeah.
01:03:45.08
nuno maduro
um You know, and ah but I have, you know, for smoke testing, that's definitely a problem. That's one of the problems for sure.
01:03:52.38
Chris Morrell
Yeah. Yeah. I've, I've never, I, I have my, my impression is it's more common in the rails world, um, to, to sort of do a seated, ah use seaters rather than factories. I could be wrong there too, but I have a friend who's in the rails world who has talked a lot about that.
01:04:11.60
Chris Morrell
And, um, One of the things that struck me about that approach, it's like, it's a little bit of a trade-off, right? It's on one hand, you do, you have to kind of think about all this seeded data across the entire application, um what impact it might have, but it does also in some ways replicate a real application a little bit more.
01:04:35.20
Chris Morrell
It's like, Our apps have to be able to handle records in the database that aren't related to the thing that you're doing.
01:04:44.37
nuno maduro
Mm-hmm.
01:04:44.63
Chris Morrell
ah And in some ways, having having just like a big data set seated first and running all your tests, and that means that you have to deal with like real world scenarios.
01:04:44.57
nuno maduro
Yeah.
01:04:50.52
nuno maduro
yeah
01:04:54.43
Chris Morrell
Because I know that like, I've certainly seen tests where You know, you're doing like an assert count that like only one thing was created or nothing nothing was created.
01:05:06.49
Chris Morrell
And it turns out the only reason that that actually works is because your test is running in isolation. It's not actually that um that that there's actually a bug in your code.
01:05:19.38
Chris Morrell
but because you're like doing everything from scratch each time you don't get to it.
01:05:19.81
nuno maduro
Mm-hmm.
01:05:24.70
nuno maduro
You don't get to it, yeah.
01:05:24.91
Chris Morrell
So it's an interesting approach. I don't know if it's going to be worth it because it does feel like there's a big trade-off on the other end in terms of maintaining this one big suite of seeders. But I wonder if the value prop has kind of changed a little bit now that browser-based smoke testing is so much easier to do.
01:05:42.84
nuno maduro
Mm-hmm. I wanted to bring in a topic, if you don't mind. um
01:05:46.18
Chris Morrell
Yeah, let's do it.
01:05:46.91
nuno maduro
So um do you so I never did it in the past. So maybe you have done it and you see the value on it. But now I'm actually considering for Laravel Cloud, for example.
01:05:57.83
nuno maduro
Do you see the value of browser testing post-deployment? So, you know, we have this test suite that literally runs browser tests on the CI. So, you know, does while we all we talked about but until right now.
01:06:10.50
Chris Morrell
Yeah.
01:06:12.09
nuno maduro
But then I do the deployment and Ladavel Cloud goes live. And now I want to run the test suite, maybe not the same one, ah because the same one would use factories and potentially fake things.
01:06:23.75
nuno maduro
But maybe another one that is a little bit more light, a little bit more light, that goes to the lot of the actual Ladavel Cloud website, logs in as a you know as a past user or whatever, which already has
01:06:23.94
Chris Morrell
Yeah.
01:06:28.55
Chris Morrell
Yeah.
01:06:35.29
Chris Morrell
yeah
01:06:36.61
nuno maduro
um already has maybe a ah setup in place, I don't know, and checks all these services and check all these pages. Because I'm going to give you a real example of one out that we just had on Laravel Cloud.
01:06:49.41
nuno maduro
Now, people didn't saw it because it's like something really hidden. But actually, the production logs were like down for one specific region. um And this only happened in production because it targets a different service from staging and from dev.
01:07:05.36
nuno maduro
um
01:07:05.78
Chris Morrell
Yep.
01:07:06.40
nuno maduro
So on your test suite, you would never see it because we are faking everything, right? We are faking logs, so would never see it. um On dev and staging may actually be working because they are using little different services.
01:07:19.78
nuno maduro
But on production, we have this separate one, which, you know...
01:07:20.53
Chris Morrell
yeah
01:07:23.14
nuno maduro
um was down and we didn't saw it like literally as customer reported on support. So maybe like bronzer testing will also unlock a little bit of post-production testing actually, which is something I have never done it, I think.
01:07:39.67
Chris Morrell
Yeah, that's really interesting. I I've done, I've used tools to do automated browser testing on, um, like on a schedule to just kind of like confirm that, uh,
01:07:54.72
Chris Morrell
you know in in our case, that users can still register. right like I want to make sure that no matter else no matter what's broken, people at least can sign up for our service. right
01:08:03.57
nuno maduro
ah huh
01:08:04.14
Chris Morrell
um or and And also the that the billing page works. um And yeah I'm trying to think. there was a There was an uptime monitoring tool that actually had a really good suite, ah really good implementation of that that felt like made it pretty easy to do.
01:08:21.42
Chris Morrell
um And we ran those for a while.
01:08:21.62
nuno maduro
Mm-hmm.
01:08:23.75
Chris Morrell
but ah The problem is they're like, they are hard to um keep in sync with your application. So the idea of having a test suite, I would probably um want to set it up so that you can run it.
01:08:32.00
nuno maduro
Mm-hmm.
01:08:42.84
Chris Morrell
both in CI and in production, right? So that that suite runs, if it fails in CI, it doesn't even make it through, but then it runs again and in production, it hits the production endpoints.
01:08:55.62
Chris Morrell
um But like, I mean, we do this as developers. I feel like this is a heuristic that I always have of like, if I find myself going and doing something after I make changes to a feature, it's like, oh wait, I should go write a test because I am manually testing it right now.
01:09:12.51
Chris Morrell
And that's true of our production apps, right? Like you you hit deploy and especially if you're like deploying something that ah for various reasons, you know production may turn up a different different errors than you than you had locally, you go and you log in and you go to that page and you make sure it's still working, right?
01:09:32.80
Chris Morrell
So why not have automated tests for that? I think it's a great idea.
01:09:36.89
nuno maduro
Yeah, I feel like this it's something is it a paradigm shift that people probably never thought about that. But I think ah now with past four, potentially that will unlock um that given situation too.
01:09:52.05
nuno maduro
um Same goes with with screenshot testing, which is something I equally demo at LaraCon US, which is something that have you used on Playwright that or not really?
01:09:57.68
Chris Morrell
Mm-hmm. Mm-hmm.
01:10:02.91
nuno maduro
OK, I don't know if that was on Cypress. I don't think it was. but um um But again, like part of this smoke testing story a little bit of seeing if things are working a little bit as expected at at the first glance comes a little bit this ah visual testing, which is something I don't know if it's official, but I call it that way.
01:10:22.57
nuno maduro
And what it does is um basically takes the works with snapshot behind the scenes. So takes a screenshot on the first run. And then you will always be comparing that's that baseline with the new test running.
01:10:36.68
Chris Morrell
Yeah.
01:10:38.20
nuno maduro
So if you see differences, I give that beautiful slider, and um which was on a demo. And I feel like even for production, something like this could be used because you are always interacting with the right your are interacting with the same user, which will create an app with always the same name.
01:10:47.41
Chris Morrell
Yeah. Yeah. I mean, that's. Yeah.
01:10:55.18
nuno maduro
So basically, like why not use screenshot testing for this too?
01:10:58.79
Chris Morrell
Yeah.
01:10:58.81
nuno maduro
um That is something that I still need to work on, which is GitHub Actions tends to create different screenshots from the one I create locally with my MacBook. um
01:11:09.06
Chris Morrell
Oh, interesting.
01:11:10.32
nuno maduro
Yeah. ah So, Evan, you told me, um so the creator of Vue actually got to hang out with them a bunch. That was super fun. That would make entire podcast just about that because the guy is just so humble. He's just so humble. have a million GitHub stars, man. If I had a million GitHub stars on GitHub, I wouldn't be that humble.
01:11:30.18
nuno maduro
It's crazy. ah So you know the guy came to me and said, I don't think you will ever solve that problem because literally Chrome behaves differently in terms of rendering in your MacBook than it behaves on Linux.
01:11:42.67
Chris Morrell
Yeah.
01:11:45.13
nuno maduro
So the only way you have to solve that problem is to make the screenshots on the CI, upload them as an artifact,
01:11:45.22
Chris Morrell
Yep.
01:11:52.72
Chris Morrell
Yeah.
01:11:52.78
nuno maduro
and then just hijack that to the actual code that way. But ah that feels clunky to me, feels weird. So I want to find a way of just working.
01:12:00.54
Chris Morrell
Yeah.
01:12:02.34
nuno maduro
I don't know.
01:12:03.68
Chris Morrell
I mean, there maybe there's a world where you could use Docker. um to render them the first time. Obviously that's no fun, but
01:12:13.73
nuno maduro
Yeah, it just lost me there with the word Docker already.
01:12:17.95
Chris Morrell
that's fair. That's fair. Yeah, no, I mean, it it is funny how these things that we take for granted, like font rendering, it's like to to make to make text show on the screen is actually such a complicated problem.
01:12:27.89
nuno maduro
Oh yeah.
01:12:35.93
nuno maduro
Yeah.
01:12:36.05
Chris Morrell
And it's it's so deeply built into the operating system down to the like the like micro pixel anti aliasing like implementation that
01:12:41.17
nuno maduro
Yeah.
01:12:47.50
Chris Morrell
it It is funny. I mean, like if you look at um the the the reason that so many people have used Puppeteer um or one of those like Chrome, Chromium based image capture utilities, ah I think in part is because it can just render text so well.
01:13:07.44
Chris Morrell
um Whereas if you try to do it in in something like GD or or even like a more sophisticated, you know,
01:13:14.81
nuno maduro
Right.
01:13:16.53
Chris Morrell
PHP implementation, it's so hard. It's wild.
01:13:18.96
nuno maduro
Yeah, but I actually, you know, when I was first building this, i actually spent some time on it trying to understand like, okay, why those operating systems are different. And, you know, ChatGPT told me, oh, it's because of font issues. And I was like, okay, I'm going to use the same font.
01:13:33.80
nuno maduro
I don't care what the users have chosen for this UI. If you are doing screenshot testing, going to just reuse the same font which is a universally supported.
01:13:41.71
Chris Morrell
Oh, interesting.
01:13:42.99
nuno maduro
you know So I'm doing like before making the actual screenshot, I'm doing a bunch of stuff before to avoid flaky screenshots. So one of the things are universal fonts.
01:13:54.91
nuno maduro
um I stop ah any kind of animation that you may have. I don't do it. So if you have you know a perfect example for this is if you have something that fades in, fades out, that's like perfect for making flaky tests.
01:14:07.25
Chris Morrell
Yeah, absolutely.
01:14:08.29
nuno maduro
ah Because if you don't go in the exactly same millisecond, the fade in will be slightly different from the baseline.
01:14:08.67
Chris Morrell
Yeah.
01:14:13.74
Chris Morrell
Yeah.
01:14:17.03
Chris Morrell
Yeah.
01:14:17.38
nuno maduro
So I don't do animations at all. There's a bunch of CSS stuff that I disable before actually making the screenshot. You don't see a difference, honestly. If you make two screenshots with all this stuff and without this stuff, it will look the same.
01:14:29.57
nuno maduro
But for visual testing, they are different. So I do a bunch of stuff.
01:14:32.52
Chris Morrell
Yep. Hmm.
01:14:34.55
nuno maduro
However, it did fail on GitHub actions for some of my projects. and So I need to come back to that topic probably post-release because I'm out of energy for this project at the moment. I spent too much time on it.
01:14:46.89
nuno maduro
It was literally the last three months. ah you know And I honestly just thanks to Laravel, honestly, because if they wouldn't allow me to work on this stuff, it would just not work for me.
01:14:58.05
Chris Morrell
Yeah.
01:14:57.97
nuno maduro
ah Because, you know, life live streaming plus, and you know, all my old other open source projects and um plus my life, you know, gym work and everything.
01:14:58.61
Chris Morrell
That's incredible.
01:15:09.02
Chris Morrell
Yeah.
01:15:09.35
nuno maduro
If Laravel wouldn't tell me, okay, well, just take this week off to work on pass and just finish that. um Or, you know, if they wouldn't give me time to work on my talk, even I would not have time for this.
01:15:19.55
Chris Morrell
Yeah.
01:15:20.27
nuno maduro
Bronzer testing is a serious thing, man. A lot of stuff into it.
01:15:23.98
Chris Morrell
Yeah, that's for sure. Yeah. I mean, With the font stuff, even even using the same font across the whole stack, I don't know that that's going to do it because it's it the same font is rendered different by different rendering engines.
01:15:39.69
Chris Morrell
you know and there's
01:15:39.98
nuno maduro
That's what Avenue told me. Yep.
01:15:41.73
Chris Morrell
yeah um i don't know. I don't know. i mean ah There's maybe a world where you can get away with like, i'm I accept a certain threshold of change.
01:15:54.15
Chris Morrell
Yeah.
01:15:55.23
nuno maduro
The thing is that when you go down that path, you know what I mean? Like if you accept a certain level of changes, then you are not pixel perfect, which is something that at Laravel, at least the designers here, they will kill you for it.
01:16:03.75
Chris Morrell
Yeah.
01:16:08.82
Chris Morrell
ah Right. That's fair.
01:16:09.85
nuno maduro
Yeah, a lot of it, like they go up to the pixel level.
01:16:10.60
Chris Morrell
That's fair. and
01:16:13.02
nuno maduro
It needs to be like pixel perfect, exactly like it is on Figma. If it doesn't match perfectly, it's not the same design.
01:16:16.85
Chris Morrell
Yeah.
01:16:19.96
Chris Morrell
Yeah.
01:16:20.02
nuno maduro
So if if we go down that path, that was my original thinking, but if we go down that path of, okay, let's accept some level of threshold. Okay, might be the differences, but ah you know the threshold might be like 1% or whatever.
01:16:33.47
nuno maduro
Then it's not pixel perfect anymore.
01:16:33.87
Chris Morrell
Yeah.
01:16:35.96
nuno maduro
ah which will work very well for CI and font issues.
01:16:36.06
Chris Morrell
Yeah.
01:16:38.72
nuno maduro
But then maybe that is actually something that is not people, it's not anymore pixel perfect and it's not captured by the visual testing.
01:16:43.72
Chris Morrell
Right.
01:16:46.29
Chris Morrell
Yeah. No, it's ah it's it's an interesting problem. ah You know what? I'm glad it's not my problem to solve. Yeah.
01:16:52.88
nuno maduro
Yeah, I mean, just a huge shout out to people who actually also helped me with this past four release. Puyapal is one of them, cracked a bunch of the Playwright stuff behind the scenes.
01:17:03.70
nuno maduro
um Adrian cracked a bunch of these visual testing ah capacities because, you know, it's not something given by Playwright. So we literally are using...
01:17:14.91
nuno maduro
various things to make this visual diffing possible. ah So we are you know we preserve things as binary, and then we ask Playwright to convert it to binary. And then we come we compare these two binaries using something from Cloudflare.
01:17:28.92
nuno maduro
So all this kind of feature was built by Adrian. And then I have kind of make it a little bit more Laravel-ish friendly. um But ah you know ah Sonali also worked on Past4.
01:17:42.08
nuno maduro
um And what you know my wife for literally just being patient with me because yeah you know I work literally from my room.
01:17:47.45
Chris Morrell
Yeah.
01:17:50.32
nuno maduro
um So I'm streaming from my room too. And just sometimes having to deal that I work until 3 a.m. every single morning, every single night is not easy.
01:17:58.77
Chris Morrell
yeah
01:17:58.84
nuno maduro
um And honestly, thank you for you too, because i mean that small um POC that you have made for Tusk also sparked a bunch of possibilities on this Pass 4 project.
01:18:10.12
nuno maduro
And John Purvis for making the profanity checking on Pass 4. So actually, I didn't demo the entire Pass 4 release at Latakon US. um So there's multiple other things that we are going to ship with Pass 4, including ah type checking.
01:18:26.79
nuno maduro
which is something that... So we had type checking before, type checking coverage, ah which allows you to see how many types you use in your code base. But now on past four, we'll be twice faster and instant on subsequent runs.
01:18:40.20
nuno maduro
So we have that. We have profanity checking. So if you have any bad word in your application, we are going to detect them for you. And this was done by John Purvis. um Thank God I'll pass this open source, honestly, because...
01:18:53.72
nuno maduro
you know I wouldn't be able to build all of this myself. um Caleb also, Caleb takes an approach a little bit different from mine, I feel, because I'm super open about all this stuff.
01:18:57.04
Chris Morrell
Yeah.
01:19:02.92
nuno maduro
And he comes up with Livewire 4, also with a bunch of features, but feels a little bit more ah closed than me, at least. ah He kind of works on his own space, on his own thing, and by himself, I feel.
01:19:15.73
Chris Morrell
Yeah, I think that his approach to open source is a little bit, it's it's just different. It's like he's he's giving the code out and he accepts contribution, but I think that it's like he's building it and if your contribution works for what he's doing, he'll accept it, but he's like his his like holding it a little bit tighter, which I think is just like ah different approach. It probably just works better with the way he is, you know?
01:19:43.37
nuno maduro
Oh, yeah, absolutely. Oh, yeah.
01:19:46.22
Chris Morrell
Yeah, I mean, open source working on open source is is so much fun. and um And I love that component of it. I mean, I think at Internet, actually, we've benefited so much from just random folks bumping into issues that we haven't bumped into yet and fixing them in in our packages.
01:20:06.11
Chris Morrell
You know what I mean?
01:20:06.72
nuno maduro
Oh, yeah.
01:20:06.95
Chris Morrell
Yeah.
01:20:07.52
nuno maduro
Mm-hmm.
01:20:07.82
Chris Morrell
Um, and that's, that's basically how I've kind of thought about it. I think I'm, I'm probably a little bit more like Caleb in that I put a lot of stuff out there and I'm happy for contributions, but like, it's mostly like I'm, I'm building the thing the way we need it.
01:20:25.26
Chris Morrell
And if other people can benefit from that, I, I, that makes me so happy. Um, but the number of times that, ah someone has come back and said like, oh, here's like a fix for this little edge case, or here's a, here's a translation, you know, in, in another language um has, has been really, really helpful. It's such a ah great part of the the process, you know?
01:20:52.73
nuno maduro
Yeah, that is good and bad in open source. The good one is the one that you just mentioned, obviously having this project growing so much because of contributions.
01:20:56.70
Chris Morrell
Yes.
01:21:02.77
nuno maduro
And I have you know countless projects that have grown so much because of people, literally people that yeah are last ah you know less social media than me, but they they actually are big you know big things on this open source project that I build.
01:21:19.17
nuno maduro
But also like You know, I kind of have built a filter over time around this, but um so I talked with about Taylor about this situation, but I remember like back in the days, ah you know, four or five years ago, I would spend, you know, five months or whatever building something, just, you know, working my ass off to have something out.
01:21:25.46
Chris Morrell
Yeah.
01:21:42.51
nuno maduro
And that single comment would just destroy my entire week, literally.
01:21:47.60
Chris Morrell
Yeah.
01:21:47.53
nuno maduro
Just destroy me completely.
01:21:48.48
Chris Morrell
yeah
01:21:49.51
nuno maduro
And people sometimes have no idea how just being mean with others can just affect people, you know? ah Not everyone is the same.
01:21:56.37
Chris Morrell
Yeah.
01:21:57.94
nuno maduro
And um yeah I remember, like... um in what but I remember like what truly bugged me back then was not the comment itself, but the fact that I would be down at the table at night. you know My wife is next to me and I'm like sad. And that would just destroy me a little bit inside because I was like, why I sad about this random dude that I don't even know?
01:22:22.17
Chris Morrell
yeah
01:22:22.14
nuno maduro
in my wife is asked to deal with me being sad. That would just destroy me completely. Yeah. And you Taylor kind of was said, just, you know, for him was a little bit the same back in the days with Laravel 2 and Laravel 3.
01:22:36.51
nuno maduro
And, you know, over time, i've at least I speak about myself, I have developed this filter that just literally nothing brings me down anymore. um You know, if I'm building something, i'll either that be an open source project or even a video, you know, with videos, people can be really mean to you.
01:22:46.45
Chris Morrell
Yeah.
01:22:55.50
nuno maduro
You know, they can...
01:22:56.98
Chris Morrell
Yeah.
01:22:57.29
nuno maduro
You know, they can tell you things about your face. They can tell you things about your voice. They can mock you. They will do all kinds of things. And thank God I have this filter now, because if I were starting to be a YouTuber 10 years ago, I would just already quit because ah people on the Internet can be really mean sometimes.
01:23:14.60
Chris Morrell
yeah
01:23:17.18
nuno maduro
And um You know, um yeah, I mean, now it's a little bit better. Honestly, it's just good now. I don't, um I care much more about ah the people who are supporting me.
01:23:29.81
nuno maduro
And there is a lot of people supporting me than the ones that don't even care. Because most of those mean comments, they would not come from people that know me. They would not come from people that even belong to this community.
01:23:40.98
nuno maduro
ah community, a Flatafel community, PHP community, they would come from random people and literally just, they would just put that out there without even thinking.
01:23:42.74
Chris Morrell
Yeah, yeah.
01:23:51.10
nuno maduro
You know, sometimes in and they they are not even being means.
01:23:51.65
Chris Morrell
Yeah, yeah.
01:23:54.30
nuno maduro
They don't they don't just consider it a little bit. um So, You know, that this goes for all the people who are probably listening to us and um are considering in creating, you know, content that either be an article or a video or an open source project or giving a talk on stage.
01:24:12.00
nuno maduro
There is a lot more people that care about you than the ones that don't.
01:24:16.04
Chris Morrell
Absolutely. Yeah. I mean, it's it's it's an unfortunate part of human nature that we tend to fixate on the bad instead of the good, right? you that Like you said, you'll get 10 very positive reactions and one negative reaction, and it's the one negative reaction that ah people tend to fixate on. And i've certainly I've certainly been there as well.
01:24:41.17
Chris Morrell
Um, and I do think to some degree, it's like, you just have to, you have to be willing to put yourself out there long enough that you can like find a way to cope with it for different people. It's different, different, uh, different approaches.
01:24:54.09
Chris Morrell
Um, but like, it's something that you, you do have to deal with when you put yourself out publicly on the internet for sure.
01:25:01.66
nuno maduro
yeah
01:25:01.82
Chris Morrell
ah but that said, i mean, you know I think that I gave a talk at Laracon last year, and it was all about ah open source.
01:25:13.34
Chris Morrell
And... you know For me, the key takeaway of open source um has really been the the community that it's opened me up to. And it's 100% worth it you know to put yourself out there because if you can get over the the the few negatives that exist out there, i mean, i wouldn't I don't think I would be having this conversation with you if it weren't for, ah you know,
01:25:27.71
nuno maduro
Oh, yeah.
01:25:40.66
Chris Morrell
having contributed to Laravel five years ago. right like not that Not that there's a direct line between those two things, but that like getting involved and contributing to Laravel in 2016 or whatever, ah which I recognize is much longer than five years ago, ah now that I think about it, is...
01:25:47.70
nuno maduro
Yeah.
01:26:00.09
Chris Morrell
is ah you know opened me up to a bunch of other things that, that, that just like opened up more and more doors. Right. And I think it's, it's been fantastic for me.
01:26:15.08
Chris Morrell
um I see it for you too. I see it for a lot of other folks in the community. Like, yeah, you put yourself out there. You, you try to engage with, with the world and like you take, if you can take the good and leave the bad, it's, it's great.
01:26:28.71
Chris Morrell
You know?
01:26:28.78
nuno maduro
it Dude, that it's such a powerful message, the put yourself out there quote, because you know sometimes when people think about creating something or just putting themselves out there, either that be a talk, a video, an article, they think, okay, I have created an an article and 10 people saw it.
01:26:47.49
nuno maduro
That's not the outcome. That's not the outcome of that single action. The outcome will be one of those 10 people they will remember you and they will probably want to do something with you in the future. And you build something together and you think, well, we built that something together and only 100 people saw it.
01:27:08.90
nuno maduro
That's not the outcome again, because 10 out of those 100 people will be your lifetime supporters forever.
01:27:15.38
Chris Morrell
Yeah.
01:27:15.33
nuno maduro
And there is like, ah dude, i if I start thinking that he's,
01:27:15.50
Chris Morrell
Yeah.
01:27:19.45
nuno maduro
Hundreds of examples of situations like this. And I just saw one today on Twitter. Like Mary, I'm a big fan of Mary, one of the speakers at LATACON US, because I know how much she put work into things. she She likes to be perfect on everything she does. And, you know, when I saw Mary on stage, I thought I knew exactly how much she worked in to deliver this talk.
01:27:42.15
Chris Morrell
yeah
01:27:42.15
nuno maduro
And the fact that people are happy you to ah happy to see Mary on stage and people were saying good things about the talk itself, I was just so happy because I know this will just unlock.
01:27:58.15
nuno maduro
Mary will skyrocket from this place because today, even today, like Jeffrey, we reached Mary. Would you mind being one of our instructors?
01:28:03.61
Chris Morrell
Yeah.
01:28:06.29
nuno maduro
And because of those, you would think, oh, I did a call, a talk, and that's it. No. Like, you did a talk, a lot of people saw, and people noticed, and now you have Jeffrey Wei coming to you asking you to be one of the instructors.
01:28:17.84
nuno maduro
And maybe like,
01:28:18.18
Chris Morrell
That's so funny. ah Go ahead.
01:28:20.24
nuno maduro
you know and And then like maybe you will invite Mary again to be on this podcast.
01:28:20.77
Chris Morrell
Yeah.
01:28:25.41
nuno maduro
Or you know it just unlocks everything. You'll find better job positions. And if you can combine this with being nice, which is something I always try to tell people too, if you are nice, just by being nice itself, you are also locking doors, basically.
01:28:41.90
nuno maduro
ah Because people want to be with you. They want to hang out with you. They want to know you more. they you know It's insane, man. And honestly, every time kind of every time I see a developer, there are developers way more talented than me.
01:28:54.32
nuno maduro
And every time I see them, but they are just always afraid of just doing stuff, it just breaks my heart a little bit. And hopefully... In the Laravel community, we are not talking about much more about this, about being open and putting yourself out there.
01:29:07.33
nuno maduro
Hopefully, this message will reach enough people that ah you know a lot of people in Laravel community will just do this naturally.
01:29:15.34
Chris Morrell
Yeah. I love, I love that you brought Mary up. i was about to, I was ah about to use the exact same example because I so happy to see that interaction. I'm not on Twitter anymore, but ah someone mentioned it i went over and I just like to see her go from couple years ago, showing up at Laracon, not knowing anyone, just like kind of taking a risk ah to, to check this thing out.
01:29:41.53
Chris Morrell
And, just to see her, I don't know, connect with the Larabelle's community and then, um you know, engage with ah but her local meetups. She's, she's, she talked to PHP NYC. She talked to PHP Philly.
01:29:53.88
Chris Morrell
um You know, I think that it's a great, it's just a great example of how um our community is really like rallying for people and trying to support each other.
01:30:07.92
Chris Morrell
You know, like ah but love, I don't know.
01:30:08.51
nuno maduro
Oh, yeah.
01:30:10.08
Chris Morrell
I love that.
01:30:11.31
nuno maduro
Dude, you can you can't feel that. I was one of the speakers and I felt that... this This is incredible because I literally felt when I was on stage that people wanted me to be happy on stage and to be successful on stage.
01:30:23.77
Chris Morrell
Yeah.
01:30:24.65
nuno maduro
And when i was i out when I was outside, when I was, for example, watching Caleb's talk, people wanted Caleb to...
01:30:24.83
Chris Morrell
Yeah.
01:30:31.15
nuno maduro
just enjoy himself on stage, like having fun and just, you know, they wanted they wanted Caleb to be successful with Livewire 4.2. And you can see people clapping.
01:30:39.45
Chris Morrell
yeah
01:30:41.13
nuno maduro
They are, you know, they are literally, lot our community have really something special. And sometimes it's difficult to describe a little bit, but it just comes out of small things like this. um Either, you know, you are on stage supporting people.
01:30:54.17
nuno maduro
I just love it. I just love it, honestly.
01:30:55.59
Chris Morrell
Yeah. Yeah. Yeah. I mean, i think I, I just, I just recently spoke with a friend of mine who runs a, uh, local, uh, coworking location.
01:31:09.42
nuno maduro
Mm-hmm.
01:31:09.57
Chris Morrell
Um, And one of the things that really struck me is when I used to work there, it's not it's not convenient for me to go there, so I don't get up there much anymore. But when I used to work there every day, um he and ah the other community manager there would talk about um community all the time. you know i feel like every every third word out of their mouth was community.
01:31:33.68
Chris Morrell
and i And I remember kind of like, ah just feeling a little bit like, okay, like it's also just it's also just a place to work. like it's not It doesn't have to be so so so so special.
01:31:46.73
Chris Morrell
And then I went to other co-working places and I realized, oh no, like the the thought and effort that they put into like fostering like a community of people in this space is actually special.
01:31:59.26
Chris Morrell
And I just was like, you know it's like when you're in the midst of it, sometimes it's hard to notice it, but then when you leave, leave ah you can sort of see more clearly. ah had that experience there and I feel like the Laravel community is the same way. It's just like, there's something special about it and there's obviously a lot.
01:32:18.70
Chris Morrell
I think that there's been a lot of intention. I think that, you know, obviously Taylor thought about this a lot. I think that Matt Stauffer is another example of someone who like, put a lot of intention into the Laravel community for a long time, or still does.
01:32:30.76
Chris Morrell
Lots of folks, yourself included, like are like working to foster a really good space for everyone to be in. And when you go to Laracon, it's just like so obvious that that's working.
01:32:46.18
nuno maduro
How was your Lada Khan, by the way? Like, um, did you have fun overall?
01:32:50.10
Chris Morrell
it was It was great.
01:32:50.86
nuno maduro
Um,
01:32:52.86
Chris Morrell
Yeah. I mean, like I said, i i ah I think it's it's funny because Laracon for whatever reason, I think i didn't I didn't know a ton of people there. i guess I knew people. I don't know what the difference is, but I did not feel nervous going on stage at all.
01:33:12.89
Chris Morrell
I felt fine. But Lerikon US, I was a nervous wreck ah leading up to my talk.
01:33:19.31
nuno maduro
Yeah. Yeah.
01:33:21.34
Chris Morrell
um And and like I was just like pacing the halls. just like i I had this this idea that I was trying to still nail down for like my just like concluding statement.
01:33:35.57
Chris Morrell
um And it's funny.
01:33:36.98
nuno maduro
a
01:33:37.35
Chris Morrell
I like ran it through with Joe Tenenbaum the night before. And I was like, I can't get this one, like this one sentence, right. And I said to him, what I'm trying to say is essentially.
01:33:46.35
nuno maduro
yeah
01:33:49.07
Chris Morrell
And then I said it perfectly. And we both were like, Oh my God, that was it. And I like got up to my laptop and tried to write it down. And I, could, I just, I, I got it right just once. And then I lost it forever.
01:34:01.32
Chris Morrell
But, um, Yeah. I, I, I ultimately, you know, figured something else out. Um, but I was, I was, I had a hard time being present for the first half of that first day.
01:34:13.27
Chris Morrell
But then when I got my talk out of the way, um I was able to like sigh and, uh, be there for the, for the event.
01:34:19.20
nuno maduro
Yeah.
01:34:21.40
Chris Morrell
I thought it was great. I mean, not, I thought that every, every talk was phenomenal. I, I think that like, um, I've had other Larikons where it's like, there couple that I'm just like not super interested in, or i miss because of some, some, some reason or another, but I thought that the talks, I mean, I do think that the, the caliber of the talks and like the, the expectations of the talks are so it's just like so high right now.
01:34:38.73
nuno maduro
Mm-hmm.
01:34:54.58
nuno maduro
Dude, crazy.
01:34:54.92
Chris Morrell
think that's part of why I was feeling so nervous is just like,
01:34:56.73
nuno maduro
Yeah.
01:34:59.27
Chris Morrell
I was joking with with Joe, like ah Joe Dixon, when he flew that drone on the stage, he kind of screwed us all over because now you're like comparing yourself to, oh, well, am I going to be flying a drone on stage using reverb?
01:35:05.49
nuno maduro
Dude insane. Yeah.
01:35:09.08
nuno maduro
Yeah.
01:35:11.45
nuno maduro
did
01:35:14.44
nuno maduro
Dude, I remember like back in the days coming up with Sublime Text and doing some live code.
01:35:14.96
Chris Morrell
but
01:35:20.25
nuno maduro
That was it. that was That's like the bar.
01:35:21.66
Chris Morrell
Yep. Yeah.
01:35:23.03
nuno maduro
That's like the the biggest you know the biggest thing ever. Now it's just, it's the minimal expected. It's that you bring something that feels live or feels a little bit, you know.
01:35:33.52
nuno maduro
And Joe Dixon came with a drone and that was like, oh, you know.
01:35:37.32
Chris Morrell
Yeah. Yeah.
01:35:39.19
nuno maduro
I feel like, you know, it's it's kind of expected that people put the bar that way because a lot of cons have been, you know, with A players, basically. And it's kind of good that new speakers are kind of respecting that a little bit and bringing their A game too.
01:35:56.05
nuno maduro
Yeah.
01:35:56.40
Chris Morrell
Yeah. yeah
01:35:58.60
nuno maduro
So I feel like this year we have a great lineup, but also like all the lineup, you know, lead um was there for the expectations, you know. ah All talks were great.
01:36:08.94
nuno maduro
And um i really liked this I really like this LadaCon.
01:36:09.72
Chris Morrell
yeah
01:36:14.30
nuno maduro
And to be truly transparent with you, I told this Taylor too, when I saw like LadaCon US Newark in five years ago, i thought, okay, this is it.
01:36:14.91
Chris Morrell
yeah
01:36:22.68
nuno maduro
This is the peak of LadaCon in Laravel. You know, we are literally in Newark.
01:36:28.89
Chris Morrell
We're the PlayStation Theater in Times Square, man.
01:36:29.06
nuno maduro
You know, ah please. Exactly.
01:36:32.01
Chris Morrell
Yeah.
01:36:32.21
nuno maduro
Exactly. And I thought, okay,
01:36:33.03
Chris Morrell
How can it get better than this?
01:36:34.67
nuno maduro
Exactly. I thought that was it. Impossible. Like this is the peak of Laravel. Caleb just came with Livewire and um you know lot ah Taylor came with Vapor. That was like, that's it. We cannot be more than this.
01:36:45.55
Chris Morrell
Yeah.
01:36:46.25
nuno maduro
you know And then last year we had this huge Laravel where you know a lot of people came with stuff. I came with Pass 3, Caleb with Livewire 3, Taylor with ah Cloud.
01:36:58.33
nuno maduro
And there was like stuff all over the place. That was already overwhelming for me. But this year, we level up the things. Like, we have a venue with 1,100 people. So the biggest Laracon ever.
01:37:11.80
nuno maduro
the venue The venue was literally a concert theater. So, you know, it felt huge.
01:37:14.85
Chris Morrell
yeah
01:37:16.43
nuno maduro
I don't know about you, if you came for the rehearsal on the day before. But for me, when I came to the rehearsal and I looked this way, I was like, holy moly.
01:37:20.37
Chris Morrell
Yep.
01:37:25.83
Chris Morrell
Yes.
01:37:26.13
nuno maduro
This will feel so big to me tomorrow.
01:37:28.79
Chris Morrell
Yeah.
01:37:28.73
nuno maduro
i Dude, I did the rehearsal three times.
01:37:32.49
Chris Morrell
Yeah.
01:37:32.77
nuno maduro
I was so, yeah, literally, I was so scared about my laptop that don't have the proper resolution because of bronzer testing and shit like that.
01:37:40.29
Chris Morrell
Yeah.
01:37:40.83
nuno maduro
So i did I did once, I did twice, and I did the third time at the end of the day because I really wanted to make sure everything was perfect.
01:37:41.10
Chris Morrell
yeah
01:37:47.64
nuno maduro
And... you know It doesn't get easier for me. like I have been in Laracons for couple of years now, and every single time I'm just scared to death. Every single time.
01:37:58.09
Chris Morrell
Yeah.
01:37:58.76
nuno maduro
So nervous. And I cannot even imagine. like I have been speaker ah day two sometimes. um And just not speaking in day one is just horrible for me.
01:38:05.56
Chris Morrell
Yeah.
01:38:08.76
nuno maduro
It just kills me inside because I'm like... on the venue, I have to see these great speakers and I know, okay, if I'm not performing, I will be the only one not performing and just feels so bad and I'm just thinking about that.
01:38:21.31
nuno maduro
All I can picture it is like people making fun of me and then whatever. It's just crazy, man.
01:38:26.19
Chris Morrell
yeah
01:38:26.30
nuno maduro
and And I go to my hotel when that happens and I just look at the, you know, I just horrible.
01:38:32.90
Chris Morrell
Yeah. No, it's it's hard. it's ah It's a scary thing to do. It really is. I mean, it's a rewarding thing to do. And, you know, I think like... I think for me, i you know I'm in a place in my career where I'm not i'm not i not trying to build an audience or sell something.
01:38:51.45
Chris Morrell
um
01:38:51.71
nuno maduro
Mm-hmm.
01:38:52.54
Chris Morrell
So i get to I get to basically think about this as this is really just a way to meet people and make friends, um which is...
01:39:03.29
Chris Morrell
It's an incredible opportunity to do that because you know it it gives everyone in that room an excuse to be able to talk to you. you know um And I'm like uncomfortable. i' I'm ah introverted in those scenarios. I don't want to go up to someone and talk to them.
01:39:19.11
Chris Morrell
Other people are feeling scared. We're all just like wanting to chat, but like not ready to do it. And when you give a talk, at least there's a reason for someone to come up and say something about your talk. Yeah.
01:39:30.01
Chris Morrell
um And so you know it was it's incredibly rewarding in that way. And it's it's incredibly rewarding. I think it forces you to really master the thing that you're going to present on.
01:39:42.43
nuno maduro
About to do.
01:39:43.63
Chris Morrell
right
01:39:43.58
nuno maduro
Yeah.
01:39:44.67
Chris Morrell
um But it's I mean, i got home from Denver. ah It's two hours earlier here. It's it's a two hour time difference. So um we put the kids to bed.
01:39:58.69
Chris Morrell
It's 930 Eastern. So that's 730 Mountain Time. i went straight to bed. ah slept from 930 to 930 that first day I got back.
01:40:06.92
nuno maduro
ah
01:40:08.45
Chris Morrell
I was just so exhausted.
01:40:10.66
nuno maduro
I know.
01:40:11.92
Chris Morrell
it's it is wild just how overwhelming it is.
01:40:14.01
nuno maduro
Dude, I slept for 16 hours, I think. And i I was still tired when I woke up.
01:40:19.25
Chris Morrell
Yeah.
01:40:19.28
nuno maduro
like the men i mean I'm an extrovert. I'm lucky enough to be an extrovert a little bit. And um and I would come home. I slept for 16 hours. And I woke up. And I was like, I'm i'm still exhausted.
01:40:29.61
nuno maduro
like I feel exhausted. Mentally drained from the traveling, from everything, literally, from the shitty food I'm having for the last four days.
01:40:32.91
Chris Morrell
Yeah.
01:40:35.74
Chris Morrell
Yeah.
01:40:38.07
nuno maduro
And... um You know, and ah from speaking with everyone, you know, so I just came home, slept for 16 hours straight. No stop.
01:40:46.08
Chris Morrell
Yeah.
01:40:46.48
nuno maduro
And felt in in I didn't wake up in in the middle. It was just, you know, 16 hours straight of sleep.
01:40:51.06
Chris Morrell
It's awesome.
01:40:51.45
nuno maduro
And are you an extrovert or an introvert?
01:40:52.24
Chris Morrell
It's awesome.
01:40:54.76
Chris Morrell
Um, I, I think I span both. I think that when I get going, I think that I have, I think that I have, um, I have a hard time like making that initial connection with people.
01:41:08.55
Chris Morrell
Like I don't, I, I, if I'm in a crowd, i tend to sort of like shy away until,
01:41:09.24
nuno maduro
Mm-hmm.
01:41:18.30
Chris Morrell
um until I have like a, an opening or whatever, or someone like invites me in. But then i I think that when I feel, once I feel comfortable, I'm, I can be fairly extroverted. So I think I kind of play both sides to some degree.
01:41:35.83
nuno maduro
and Okay. and Yeah, I'm definitely an extrovert, meaning that um i my hands start sweating when I'm ah around people, you know. I just get happy and I cannot stop. Just so, yeah, I'm definitely an extrovert.
01:41:46.09
Chris Morrell
That's awesome.
01:41:48.34
nuno maduro
so But it still drains my energy. i don't know if that has a name or whatever, but ah at the end of those three days, i just i cannot see people anymore.
01:41:50.97
Chris Morrell
yeah Yeah.
01:41:55.43
nuno maduro
I need to go home. Yeah.
01:41:56.85
Chris Morrell
Yeah. It's a lot. It's a lot. I mean, and like you said, it's 1100 people.
01:41:58.61
nuno maduro
Yeah.
01:42:01.60
Chris Morrell
ah It's a lot of conversations, a lot of shouting over music or other people, a lot of just, you late nights. And it's, it's fun though.
01:42:11.67
nuno maduro
yeah Did you enter the technical party?
01:42:15.12
Chris Morrell
Yeah. Yep. Yeah. I went up to that. i you know, I was, um still feeling, i was still feeling kind of nervous about the talk. Um, Joe and I ran each ran versions of our talk for each other before going up there.
01:42:29.93
Chris Morrell
And then I, I, I told myself, okay, I, like stay for a half hour an hour or hour whatever, and then go down get some good sleep. I ended up staying ah until they kicked us out actually. So I, I ah managed to ah enjoy that.
01:42:45.05
Chris Morrell
It was, it was fun. ah An old friend of mine from Philly um moved to Denver many years ago. I lost touch, touch with him. um And he walks up to me at the most, the technical party. And, and at first I'm, I'm looking at him like, I know your face, but I don't even know where from. Cause it's like, I haven't seen this guy for probably a decade.
01:43:09.05
Chris Morrell
It turns out he, uh, he, he's not a Laravel guy. he he's not going to Laracon. He lives in Denver. He heard, he saw Aaron Francis's like story about losing his job.
01:43:24.61
Chris Morrell
And from that, went back and listened to the entire back catalog of mostly technical, um, and has become a mostly technical fan. So he just came to the party because it was mostly technical and he was in Denver.
01:43:38.15
Chris Morrell
Um, It was the wildest, just like such an incredible ah chain of events. He was like, yeah, I knew that ah somehow he knows Matt Stauffer too.
01:43:50.68
Chris Morrell
was like, yeah, I knew that Matt Stauffer might be there and I thought maybe he'd be there. So I thought I'd just like come and see what happens because I'm like such a big fan of the podcast. um So that was, I so i had just ended up catching up with him for a lot of the night.
01:44:04.53
Chris Morrell
Did you manage to go up or were you feeling too nervous?
01:44:05.78
nuno maduro
No. So, yeah. so i had So I had this golfing thing during the day.
01:44:11.19
Chris Morrell
Yeah. Yep.
01:44:12.25
nuno maduro
That ended up late, like 7.30, I think. And um I thought, okay, I'm speaking um ah next day, first time first dude going on stage.
01:44:15.21
Chris Morrell
Yep.
01:44:21.32
nuno maduro
So I thought... Okay, if I go to this party, I will have to scream because of's a lot of people in order to speak. You'll have to scream. I will destroy my voice.
01:44:27.69
Chris Morrell
Yep.
01:44:29.62
nuno maduro
And I said, okay, I'm not going. I won't go. And I went to the hotel with my wife and we immediately fell asleep, which is something I was really happy about.
01:44:40.34
Chris Morrell
That's awesome.
01:44:40.35
nuno maduro
This is something else for those who are not speakers have to think about is that if you don't sleep, you will be no energized on the day after.
01:44:40.66
Chris Morrell
um Yeah.
01:44:46.78
nuno maduro
it And just, you know, and ah for a lot of people, not being able to sleep just screws a little bit to their head. Like, um because you you want to you want to fell asleep.
01:44:53.03
Chris Morrell
Yeah.
01:44:55.16
nuno maduro
But if you start thinking like, I cannot fell asleep. I cannot fell asleep. It's just horrible. So anyways, I fell asleep, i wake up in the morning, went to the gym, had good food. And yeah, it was ready. Everything just perfectly aligned.
01:45:07.76
nuno maduro
I was lucky.
01:45:08.24
Chris Morrell
That's awesome. um but Yeah, how was golfing for you? i have Have you ever been golfing before? Yeah, same here.
01:45:13.11
nuno maduro
No, never golfed. So that was my first time golfing. And um it went way better than I expected. Like literally I thought, yeah, I thought, okay, i will never be able to literally touch on the ball even.
01:45:20.56
Chris Morrell
oh wow. Okay.
01:45:26.20
nuno maduro
um But I did some moves there. And um I was not the only one.
01:45:29.47
Chris Morrell
There you go. out
01:45:30.24
nuno maduro
Like everyone sucked pretty much. You know, Taylor, Adam.
01:45:33.62
Chris Morrell
I certainly did. Okay.
01:45:35.46
nuno maduro
Yeah, so everyone sucked. And there was like Eric Barnes, for example. He is like actually a legit player.
01:45:44.67
Chris Morrell
Yes. I heard that he has like a watch that like tracks the distance and like ah he had all his gear with him and.
01:45:45.29
nuno maduro
he would actually do...
01:45:52.22
nuno maduro
Yeah, he had like binoculars to kind of understand the degrees where he was and understand the wind and how that would affect the trajectory of the ball and whatever.
01:46:00.03
Chris Morrell
oh my God.
01:46:02.33
nuno maduro
So that was him. But also like there was one dude called Adam Francis that actually he said, oh, never played, you know, and blah, blah, blah. But then he was actually good too.
01:46:11.74
Chris Morrell
ah heard he killed it. Yeah.
01:46:13.06
nuno maduro
Yes. So I think he actually got so he got some training before going to this golfing thing.
01:46:14.13
Chris Morrell
That's so funny.
01:46:17.88
nuno maduro
I'm pretty sure he actually, yeah, yeah,
01:46:18.21
Chris Morrell
You think?
01:46:20.04
nuno maduro
Because he was like actually doing some good moves and you can see no way you just learn how to golf today. Like he you actually know some stuff about this. So he said, oh, no, no, my first time. That's bullshit.
01:46:31.10
nuno maduro
He actually got some training and some real one um before going to this golfing situation.
01:46:31.28
Chris Morrell
and
01:46:37.33
Chris Morrell
That's so funny. Yeah, I was, um Dave Hicking was in Philly ah like a month or two ago. um and we got together and just like on sort of a whim, we went to one of these like indoor golfing simulators where it's like, you know, it's like a big screen and a little green and you can like hit golf balls into the screen. They have some sort of way of like ah projecting where the ball would have gone.
01:47:06.12
Chris Morrell
And I went into it thinking like, okay, I've been to a driving range once or twice in my life. and like, how hard could it be? Right. Uh, we, we practiced hitting for maybe a half an hour and then played like a fake, a fake hole.
01:47:22.21
Chris Morrell
Um, and over the course of two holes, I think we were plus 15 over par each of us. And I was like, Oh no, this is not looking good.
01:47:32.91
nuno maduro
yeah
01:47:33.23
Chris Morrell
Uh, but yeah, it was, I, it was, I did not have the Aaron Francis experience. I, I went out there and I was just like, Oh my God, this is terrible. And I am terrible at it. I never need to golf ever again.
01:47:46.47
nuno maduro
That was a fun one.
01:47:48.79
Chris Morrell
it was It was fun. i I think I love the idea of a pre-Laricon event. I think next year it should be ah bowling or cornhole or i don't know, so something a little bit more accessible.
01:48:04.29
nuno maduro
Yeah, I think, um you know, that was organized by Hank and there was a lot of an organization into it.
01:48:11.36
Chris Morrell
Oh, sure.
01:48:11.39
nuno maduro
um There was a lot of people golfing.
01:48:13.83
Chris Morrell
Yeah, it was a huge event.
01:48:14.14
nuno maduro
is There's a lot of huge event, a lot of people golfing, a lot of people that needed to be there to help us out.
01:48:20.77
Chris Morrell
Yeah.
01:48:21.23
nuno maduro
um You know, we did basketball last year. That was fun.
01:48:24.71
Chris Morrell
Yeah.
01:48:25.82
nuno maduro
Maybe next year will be soccer or something else. I don't know.
01:48:29.00
Chris Morrell
Yeah, there you go.
01:48:29.04
nuno maduro
But I think it made the event a little bit more complete for sure. Made the event a little bit more longer because instead of being two days, three days, you know.
01:48:32.56
Chris Morrell
Yeah.
01:48:36.40
Chris Morrell
Yeah.
01:48:36.79
nuno maduro
um And for ah for those of us who are speakers, probably ah helped a little bit to crack some of the anxiety a little bit.
01:48:44.97
Chris Morrell
Yeah. It gave us something to do instead of just sit in the hotel room and be nervous.
01:48:47.95
nuno maduro
Just look. Yeah.
01:48:50.23
Chris Morrell
Yeah.
01:48:50.78
nuno maduro
And be nervous and thinking about all the possible um things that may happen in my talk. yeah So ah that helps.
01:48:55.60
Chris Morrell
Yeah. Yeah. I want to, I love, I hope that the tradition continues, but each year maybe it's a different thing. It'd be fun.
01:49:02.35
nuno maduro
Yeah, absolutely.
01:49:03.41
Chris Morrell
Yeah.
01:49:03.34
nuno maduro
Absolutely.
01:49:04.79
Chris Morrell
Oh man. All right. We've been going for, for a while here. I don't know um if there's anything else that you have on your mind.
01:49:07.90
nuno maduro
Yeah.
01:49:10.25
Chris Morrell
I'm happy to chat, but if this is a good place to stop, I'm also happy to call it here.
01:49:14.76
nuno maduro
Yeah, I think it's a good place to stop. And, you know, for those who are listening from the beginning, um yeah, Past 4 will come out on 21 August at Latavale Live Dinamarca.
01:49:24.52
Chris Morrell
There you go.
01:49:25.78
nuno maduro
So Latavale Live Dinamarca will be um ah speaking there and I will try to tag Past 4 on stage.
01:49:35.29
Chris Morrell
That's awesome.
01:49:35.31
nuno maduro
So I'll be demoing many of the things that I didn't have the time to at Latacon US, so many features that we didn't saw yet. I'm going to demo the new stuff because in between Latacon US and today, i actually managed to do more stuff into browser testing that I didn't thought about back then because until that point, I was working for the demo.
01:49:56.81
nuno maduro
Now I'm working for something stable, which is not the deal.
01:49:59.22
Chris Morrell
yeah Two different things.
01:50:02.36
nuno maduro
Two different things, exactly. I work very well with goals in mind. um This is something that um you know ah works very well for me, even at Laravel. I like to, you know for example, if I'm building a huge feature, which could take four months, it doesn't work for me. Like I have to work on goals.
01:50:21.69
nuno maduro
And the goal is like having partially this feature implemented in production in two weeks or whatever. And then I start to trim it down into something that can be shippable. And with Password, it's no actually different. So I worked for the demo until that day.
01:50:36.51
nuno maduro
So everything was like literally... ah you know, perfect made to actually fit very well a demo. um And um now my goal is actually working towards something very stable.
01:50:48.19
nuno maduro
Even though with browser testing, I feel like a lot of what will be released will be still experimental because this is something new, a lot of new code. So will be a lot of things that i didn't account for.
01:51:00.53
nuno maduro
um so you know once people start using past four after the 21 august they will see stuff for sure and uh hopefully people will help help me out with reporting issues or you know even potentially fix those issues um by themselves but 21 august uh atlantavel live dinamark and that's the goal for now um and yeah for those who listen to me maybe um you can check you can check out my twitter eNunoMaduro, it's the username and my website, nunumaduro.com.
01:51:30.89
nuno maduro
And that's it, I think. Yeah.
01:51:32.97
Chris Morrell
Yeah. I think you're, you're on Twitter and all, all of the socials, right?
01:51:37.95
nuno maduro
Yeah, I'm all, um you know, I cross post literally everywhere.
01:51:38.32
Chris Morrell
Uh,
01:51:41.23
nuno maduro
Yeah.
01:51:41.75
Chris Morrell
I love it. Um, yeah. Uh, I, I usually ask, is there anything you want to plug, but I think, I think we covered it. Um, it's been, this has been fun.
01:51:49.95
nuno maduro
yeah
01:51:52.51
Chris Morrell
It's been real pleasure to, to catch up and, and, uh, get to get in the weeds a little bit here. And, um,
01:51:59.68
nuno maduro
Yeah, man. And potentially in the future, we get to talk a little bit about ah various things like event sourcing. you know i would love to um speak with you about that, about verbs a little bit more.
01:52:10.77
Chris Morrell
Yeah, I'm game.
01:52:13.05
nuno maduro
You know, verbs...
01:52:13.64
Chris Morrell
Yeah, i really ah i i really wanted, I actually, my original goal was to tag verbs 1.0, like just like during my talk, just before I start, just be like, okay, before I get started, I just want to do this and just hit that ah publish button.
01:52:31.25
Chris Morrell
But we just have one little gnarly gnarly thing that i I really want to get sorted before we tag 1.0, and I couldn't get to it before Laracon.
01:52:40.84
nuno maduro
Right.
01:52:41.78
Chris Morrell
I'm going to try to tag 1.0 pretty soon. But yeah.
01:52:44.26
nuno maduro
I can't imagine ah ah how painful it was to watch me using verbs for the first time.
01:52:44.43
Chris Morrell
um but yeah
01:52:49.93
nuno maduro
I was like...
01:52:50.58
Chris Morrell
I don't know.
01:52:50.75
nuno maduro
Okay.
01:52:51.00
Chris Morrell
No, I think you did a good job.
01:52:51.33
nuno maduro
Well, if...
01:52:52.44
Chris Morrell
No, I mean, i was glad to see that you were able to figure it out.
01:52:52.91
nuno maduro
ah
01:52:57.43
Chris Morrell
You know what I mean? Like it's it's a bit of a paradigm shift um and you have to, you know, it takes some time to to start thinking about things in a different way, you know?
01:53:04.85
nuno maduro
well if If you allow me to say, I think one of the biggest wins on verbs was it was not a paradigm shift. So it was still felt actions to me, you know, but it just came with a bunch of goodies on top of it, like that I just get them for free.
01:53:13.28
Chris Morrell
Hmm.
01:53:16.06
Chris Morrell
Yep.
01:53:21.49
nuno maduro
Cause I would, I already be lapsed on top of actions and verbs is literally the actions too.
01:53:26.17
Chris Morrell
Yeah. Yeah.
01:53:27.18
nuno maduro
Um,
01:53:27.68
Chris Morrell
It's just persisted actions basically.
01:53:29.31
nuno maduro
Exactly. And it would just get all that history just for free literally. And I could just, you know, all use then all the features that even Sourcy gives me. And I think like that's probably the biggest ah compelling reason to try verbs again next time maybe on the real project instead of being, um you know, um something a little bit more simple for the live stream.
01:53:38.57
Chris Morrell
Yeah.
01:53:50.53
Chris Morrell
For sure. Yeah. Well, if you, uh, You know, if you're working on something and want to dig into it, let me know. I'm i'm happy to happy to join you.
01:53:57.21
nuno maduro
Yeah, let's make it happen. Yeah, let's make happen.
01:53:59.43
Chris Morrell
Awesome. All right. Well, this has been a blast um until next time.
Creators and Guests

