Yes, AI is making generating tests become so much easier, right? Right now, if you go to Qlarko, you ask it to implement a website, implement features, it can go instantly to add in, throw in some freebie context. For example, it can help you generation end-to-end tests, unit tests, and you'll no longer be blocked by testing at the end of the implementation where you have, you just want to load your PR, but you forgot about unit tests and now you need to dedicate some time for that. It makes this become much, much more streamless, much easier. But that also means that it becomes cheap, so cheap to generate tests. Yes, you can actually forget about that, but that means that the cheaper the test generation is, the cheaper your code can be. The quality of your code can also be, and which means that the bad tests now are very cheap to come up.
Let's take a look why I want to say that, okay? So this is the test. This is a very normal test, integration test, where we actually test the provider, generate image capability, and we validate the result. This test is a valid test because it does validate the real provider integration. It validates the actual response, and when you run it with the right configuration, it passes you locally, right? But does it mean that it works? Does it mean that it really guards your code base? Well, look at the dependency. So this kind of test depends on so many unforeseen things, such as network stability, latency, rate limit, token, budget, and module behavior, because different image generation modules behave a little bit different from the other.
It can generate something less, something more. Maybe it doesn't generate at all, or you're talking about budget, right? So if you place this test in a CI-CD for PR, if something happens, something causes it to fail, now here's a couple of questions. How do we know the failure is caused because something is wrong in our implementing logic? Or because something else happened in one of the dependencies we discussed? Well, this is exactly what I call the trap in generating tests, because the test generated is invalid, but the place the AI put it is absolutely in the wrong place. And because in the wrong place, at this point, it's no longer valid, because what it runs, you cannot control whether this fails because of us, or it fails because of something you don't know.
Comments