Tobias Müller
Richard Bradshaw actually had a good talk, like in 2019, I guess he said, like everybody is talking about testing pyramids, testing, ice cones, and stuff like that, and they are taking it as a strategy, meanwhile, that they want to do less end-to-end testing, less UI testing and more API testing component testing and stuff like that. And he had a good point in that talk back then that already I mean that's 5 years ago where he said like, hey, just adapt to the technology that you're using. If you have a pure API, visual testing doesn't make much sense, right? Because you have an API that you can test. But if you do have some kind of user interface, is it enough to test the API? No, is it enough to test the UI? I would claim it can be, but in reality, the thing is what you want to do is a combination of both. So you want to combine these UI tests together with API tests in the same testing scenario. What I hate and what I see a lot out there is like people using Postman for API tests. They are sending some requests, they are checking them if I get a 200. Okay. Everything is brilliant. That is amazing. That's not how an API is used as well. I mean an API is used in the flow, so you get some data from the rest API. You go to the next call, you provide the data to the call and stuff like that. And that's the important part. It's like the whole software is always in the flow and somehow testing seems to be like static and it cannot handle dynamics. And that is exactly what you see. I mean, if the Dom is is modified dynamic. I saw a web page last time that is generating like the whole Dom dynamically all the time, it's pretty difficult to get a locator. And that's the case for all of the stuff is like if you're sending API requests in Postman, you are doing a good job. That is actually brilliant. But the thing is, is that how the API will be used by yourself to develop and pretty sure it's not. You have an authentication stream in the beginning, then you have your bearer token, the easiest case you have your bearer token and then you continue with all of the different data that flows through the API to actually get the result that you want. And that is how we should test. And that I hope that answers the question, visual testing in the sense that we do. I mean it's functional testing is not visual testing in the sense of screenshot comparison. That's a given. But testing applications via the UI is not the Holy Grail, it's not the Holy Grail as well, but it's the bare minimum that you should do because your users will only have the UI. And having the testing pyramid and telling everybody like, Hey, you shouldn't do end-to-end testing, you shouldn't do UI tests or you should actually minimize that to the bare minimum. Yeah, that is okay. If you cannot have stable units, I mean that's the root of the testing pyramid. I mean it's in the end it's money and on the other end, it's stability. It's not the strategy to do it like this. It's like the result of the surroundings of what was given back then. And that is changing. I mean, you're here and not only me, all of the vendors and all of the testing community is here to change that. But I see a lot of people just sitting there in their chair. And yeah, I always use Selenium and I still use Selenium now. It's a force generation of Selenium 20 years later and a game changer. They have relative locators now. For God's sake! A relative locator makes it even more flaky. I mean, if you have responsive web pages, if I say, Hey, this needs to be to the right of the following element and I have a responsive web page, it won't be to the right all the time. It might be below, it might be a bot for whatever reasons, I don't know. But the thing is, we see a lot of changes in there that people call game changer, which doesn't make any sense. I mean, it might be in some corner cases, I give that to everyone. But as a testing or as an automation community, I would expect that we look at new technologies. I mean, what do game developers do? They have a lot of power in your GPU, What do they do? What do they apply? What kind of algorithms do they apply actually to make us engage and how can we use that actually to analyze screens? That is where we need to go is like, what should we do? And yeah, a lot of stuff should be unit tested. Honestly, I've never seen a project that people didn't introduce a single bug because of unit test. But I understand that unit tests are a basic requirement for modern software development. I get that. And so we do a lot of unit testing that is part of the automation, right? But the thing is, I personally think that your tests should be valued far more than they are today. And know the reasons, they are brittle, they are flaky, they don't work, they are hard to maintain. And all this stuff to think about if they would be stable and if they wouldn't be hard to maintain. Wouldn't they be the first choice to do because that is what the users would use?