April 25, 2020

Why Coding Questions Are Asked In QA Interviews

By chandan

Recently I saw a post on LinkedIn where the author was questioning the interviewer about coding questions.

The argument was that for the QA Engineer role, QA would be mainly involved in functional testing or test automation suite maintenance or test automation suite execution so why we ask questions on coding rather than on testing techniques, bug prevention, and quality assurance.

So My Answer is, One of the important skills we interviewers need to measure while taking QA interviews is Analytical Skills now this could either be done by-

1.Product/domain knowledge(but As an interviewer, I may not know his domain/product and vice versa).

2.Puzzles(again this is fine for freshers as they practice these during college interviews but experience people do not practice this much hence there is no point of asking this)

3. Coding-Now interview and interviewer both know this stuff(at least the basics) so this becomes a common ground and since coding is independent of any automation tools and Programming languages (which can again differ person to person ) this is widely used in the selection process to test candidates analytical skills. I don’t think any interviewer asks any advance or even intermediate level questions here, we generally ask simple questions with a little twist and want to see how the does the candidate reacts to this. It’s not necessary that the solution needs to be perfect but here we see the approach, thinking ability, test coverage capability[yes we do see if he left out any negative test cases or not] and quality. Now each of these things holds true in testing too and tests his/her testing capabilities too.

For example, One of my favorite questions on collection/ArrayList is “Create a method/function to find the second maximum item from the list, take list[of integer numbers] with items as a parameter and return the second maximum item as an integer “.

Now based on my experience as an interviewer, More than 80% of students able to write a program for a happy flow but when I test their program with a different set of data such as null values, only one item in a list, only two items but with same values, values with different datatype apart from mentioned datatype in the method declaration, boundary values based on integer max size and so on, then I find a lot of issues in their program.

While reviewing their code, I look at the below points which are actually part of testing techniques, bug prevention, and quality assurance.

If he/she is leaving out decision-based cases, branch coverage cases, boundary value cases, out of scope cases and negative cases while writing the code then he/she is not a good tester because all these are part of testing techniques.

If he/she is not writing good code and leaving out bugs then that tests the bug prevention ability of the candidate.

If he/she is not following best practices while writing code then he is not following best practices of quality assurance (even in automation).

So, In short, These small/beginner level programs helps us a lot to analyze the candidate skills.

off course this is not the only criteria but If I would find a candidate who is writing his/her code with good test case coverage, utilizing all the test techniques and bug prevention methods then I would prefer this person compared to a person who is only theoretically good in knowing this stuff.

A lot of candidates may counter it by saying that their day to day task is to write automation script so why not analyze candidates on automation assignment project code.

My answer to that is, We do that as part of the assignment before the interview sometimes but then a lot of candidates, around 70% from hr interview to assignment round drops out especially if the company is a small or mid-level startup. They don’t complete this part as writing a good quality code[even for automation scripts] takes anywhere between 15-20 hours(based on my experience on submitting/reviewing assignments for various companies) so sometimes we have to invite them directly in interviews but During interviews, neither candidate nor interviewers have time to complete/review such assignment. We had to judge candidates within 30-60 minutes and if assignment round is not completed then these coding programs help us a lot to review candidate skills as explained in the above paragraphs.

I hope now you guys understand our[interviewer] point of view.

What do you think about this as the audience, leave out your thoughts in comments?