I read articles about TDD - everything is clear with the approach itself. I tried it a couple of times, but somehow it doesn’t work and now I’ve come back to this question again.
The question is this - for example, I decided to use TDD, but how can I come up with tests if I don’t know what errors might be? As I understand the bug is an unexpected behavior of the program and in terms of this approach (TDD) I do not understand how it can be foreseen. In my case, I often forget to check / write something and often get bugs, even though I'm a relatively experienced developer. It happens like this - I will write something, test it locally and everything is OK, upload the server to the sandbox and the tester will somehow not so click (for example) and get an error, but I haven’t tested it before - I haven’t found it. In general, there is no understanding how to properly think through all the tests in advance and check that there are no errors in the future. I hope I wrote clearly :)