What are some automation engineer interview coding tasks that are relevant to UI automation?

This is my first time being an interviewer for a QA automation engineer role (this will be a beginner role where we are trying to get fresh graduates recruited). What are some coding tasks that can be given in the interview that will be relevant to UI automation instead of asking generic coding questions like “find the 2nd largest number in an array”?

3 Likes

You can use this as a starting point and build upon it by adding progressively deeper tasks as the conversation evolves.

  1. Logic Building
    a. Example: “How would you store the contents of a file?”
    b. Storing content of a .txt file will be different from an .xlsx file
    c. This will help you understand their problem-solving approach, their grasp of coding concepts, and their ability to reason about trade-offs between different solutions.

  2. Refactoring Skills
    a. Example: Provide them with a piece of tightly coupled code and ask them to refactor it to improve modularity and maintainability.
    b. This assesses their awareness of clean coding principles and design thinking.

  3. Problem-Solving and Analytical Thinking
    a. Share some real-world UI automation challenges from your own experience, and ask them to explain how they might approach solving them.
    b. This helps evaluate their critical thinking skills, creativity, and practical knowledge.

I hope this helps and wish you luck with the interview process :slight_smile:

3 Likes

A great question if people have a lot of selenium experience is to ask “what’s the difference between assert & verify”.

  • “what’s a negative experience with framework XY” – if they can’t name a negative thing, how much have they actually deep-dived into it??

  • Do you run your test headless? If so: why? Isn’t it that we must simulate user experience and how often have you ordered something on a headless browser?

  • How would you deal with Captcha on the testing environment?

1 Like

As an interviewer that has crashed through finding out what does and doesn’t work the hard way :grimacing:, this is my current approach for understanding a UI automators skills. It needs preparation:

  • If possible, have a test/demo relevant UI system available that someone can automate tests against. If not, any demo web site that you think would exercise their skill set - but one you know and can apply your similar day to day automation challenges to.
  • Give them an open “do at home” exercise to put a framework together. No time limit other than their interview date. No unrealistic demands like a “complete framework with 80-100% test coverage”, just for them to bring it to their interview wherever they have got to. Do enough to demonstrate you know the subject.

Then for the interview:

  • Get them to present their framework, what works, what doesn’t and chat with them tester to tester. How did they prioritise? What’s their coding standards like? What did they find difficult? What would they do next if they had more time? Your questions will be driven by the context and their/your enthusiasm for their work.
  • If you haven’t already, show them the product they’ll be working on now and ask them how they would approach automating that, with the same questions.

To me you have to embrace the reality of how they will work. The need to be able to demonstrate they understand automation concepts, but not through a memory test. If we forget how to do something, we look it up - embrace that in the interview. You’ll know if they understand what they’re talking about or not. Also with this exercise you’ll find out not only if they’re capable, but if you can imagine working with them in the team and how well they’d fit.

4 Likes

Priorities number 1, 2, 3, 4, and 5: Assess if the person knows about testing. This can be the bottleneck that can affect their performance.

As a priority 6, you can assess their coding skills by rephrase problems that you encounter in your codebases: Confusing naming, bad abstractions, code fragile to input, difficult to change, etc, and ask the person to propose solutions/improvements. Perhaps two of these: One simpler where they can jump in and code, and another more complex/high-level where the person can simply describe one or two approaches, their pros/cons, etc.

I’m not sure if things have changed in the last few years but the last time I was involved in graduate interviews for QA roles (early 2020), university courses did not provide any real coverage for QA / testing. As a result of this, none of the candidates were familiar with QA outside of some high level concepts.

If this is still the case then I think @ghawkes comment above is probably the best approach. In my example above we didn’t have the opportunity to set any “homework” in advance; in hindisght it would have really helped.

1 Like

Thanks for your response. Unfortunately the company wants to hire fresh graduates. So I cannot expect them to have automation or testing experience.

thank you! the company only wants to hire fresh graduates for their coding skills. Not having any testing skills or experience is an argument that i have fought and lost at this stage. I am all for some one being able to demonstrate their skills but the engineering team (QA reports to CTO) does not believe in people whiteboarding for fear of negative reviews on Glassdoor. So it has been tough coming up with anything.

1 Like

Thanks for your input. The struggle I have is that we are trying to hire fresh graduates and I am not sure they’d have any testing skills at all because the company believes having coding skills is sufficient but we are expected to gauge that without making people code.

1 Like

Yeah I understand. Its very difficult when you have constraints put around your recruitment process.

I personally would follow the same process, just setting the bar appropriately for a graduate. However, if you can’t do any form a coding evaluation based on a coding exercise (I would be going back to my boss and questioning these constraints but I appreciate you may not be comfortable with that).

The only alternative approaches I can think of are without giving them some kind of code evaluation:

  • They could present you their own coding projects and they could walk through them with you. They’re graduates at the end of the day, so they should have something to show off with. I had a graduate candidate once for example that as part of his degree they wrote a basic chess game in Java with a fellow student. After questioning them on the code, it was clear what they did write and what they didn’t as they could only explain small parts.
  • You could sit them in front your framework code (if you’re comfortable/allowed to share it) and get them to read the code and see if they can work out what its doing. You’ll see if they know their way around an IDE and repository management tool, and also see if they have a way of working out existing code.

For me the important thing with graduates is you’re looking for potential, someone who can grow in your care that will suit your team and organisation. They will need coaching, you cannot recruit a graduate and set expectations beyond a graduate level. Hope that helps :crossed_fingers:

Kelly Kenyon (@kelly.kenyon) shares excellent advice in this article:

1 Like

appreciate the detailed response. unfortunately it is a battle i have fought and lost because management fails to see that a 3 person automation team cannot follow the same hiring criteria or interview process that a 40 person engineering team does. time to just make the most of what we can get.

1 Like

Is the core focus on UI automation only? Other aspects you can consider for interview questions, provided your interview team has experience with them:

  • (page) object modeling - modeling things for code is generic, but can also be specifically applied to UI automation. So this would be a a feasible question to ask even those not experienced with QA or UIs. It’s a good topic as well, as given lackluster modeling skills will no deliver ideal automation code.

  • questions around APIs, REST and testing of those. Graduates likely have more experience in this area than UI and QA.

  • questions around cloud and microservices and testing around those. It’s the new hot topics, so candidate may have familiarity or experience with them

  • questions around the Document Object Model (DOM) web elements, CSS selectors (or CSS formatting of elements), and javascript (focused around element interaction) - candidates may have familiarity or experience with these if they did any work/projects with UI or web applications. These skillsets and experiences can translate to UI automation in terms of better implementation and workarounds when we hit issues that native Selenium Webdriver and similar tools can’t handle with the native code where javascript can be used to workaround. CSS experience can better help with defining locators, and DOM experience for how to work with them with code and locators

They don’t learn it in school? :< XD

They don’t learn it in school?

Depends on what type of “school”? I don’t think it’s taught in universities or colleges unless taking specific courses. QA and test automation are typically not standard part of engineering curriculum, there’s not even a specific bachelors/masters engineering or other degree for QA.

So more like bootcamp or specialty schools that would cover these topics.

Where I went, the only QA coverage in courses was writing test plans and test cases, as it relates to engineering.

2 Likes

That’s true. I earned my Bachelor’s degree in Computer Science (3 years) and my Master’s degree in Information Technology (2 years) from Mumbai, India. Over 5 years, we just had a chapter on Software Testing as part of my Master’s curriculum. No mention of it otherwise.

1 Like

Here in Belgium it’s more and more becoming a “thing” there are specific lectures & courses for it, but it’s only been available for 3ish years now.

They have a lot of Project-Weeks where people like myself go and teach the students a specific topic too about quality.

2 Likes

That’s good to know, be nice if more educational institutions covered it. Maybe in the past it was a niche subset within the official fields of work that QA/testing belonged under (software, hardware, others). But now, it is significant enough to warrant coverage, but educational institutions are sometimes slow to adopt/follow the industry changes.

1 Like