How to teach test automation engineers to use a debugger
Context: It seems a lot of test engineers do not know how to use a debugger. This is based on the fact that we get a lot of null-pointer exception questions that can easily be solved if you know how and when to use step-by-step debugging.
I am looking for a canonical answer how to debug, targeted at testers. One that can be used as comment in other answers for people to try.
Question: How do we teach beginning test engineers debugger skills, so that they can analyse most common errors. Do you give such training? If yes, how? Answers should try to include:
- Why is having skills to use a debugger important?
- What should a (test) developer minimal know about using debugger?
- General training materials, not language specific (maybe link to good articles, or books)
- Simple example situation which is good for training purposes (for people with basic test automation knowledge)
Debugging is a basic skill programmers should have. Many testers lack programming skills because companies throw people with no or only little programming experience into test automation and expect them to learn such skills themselves.
Debugging is then one of many programming skills they lack. For instance, the problem with
NullPointerExceptionscan be easily resolved if they knew how to read stacktraces.
The way I learned such skills was by pairing with senior developers and watching them as they read stacktraces and debug bugs I found in their code.
The way I taught such skills was by pairing with less senior tester and showing him how to read stacktraces and debug their tests.
I don't think such approach is specific to testers. There's no magic about testers. Just treat them as other engineers and use same approaches for training you would use for regular developers.
Unless you're not asking for ways to train them but rather for incentives...