The SDET Interview

I recently finished my last contract and had an interesting interview experience. I mainly work in Java and my specialism is in UI and API testing even so I was surprised by how many questions can be asked in all honesty. Preparing for the interview is key and it will be down to your technical skill, commitment to the company, your values, and confidence. I will go over the technical aspects of the test in this post.

The Technical Test

I haven’t met another tester who actually enjoys these tests and is more afraid of them than they should be.

Coding task – This tests your knowledge of the programming language and how comfortable you are using it. Generally the more difficult the task the more time they will give you but this is not always the case. This task is given in one of four ways:

  • Live coding task – You will be asked to code something on the spot in an IDE of your choice – You can get this over and done with quickly but you need to know your IDE well and be able to program and think on the spot.
  • Take-home task – A task is sent with some code and you will be asked to fill in the details. – This is my favorite type of test as you have plenty of time to go through the code and you can run it as many times as you want. Once you have completed the task you can talk the interviewer through it.
  • Paid service task – The company has sent you a link to the service to use. – The most troublesome of the four, I don’t particularly enjoy these tests because you have to get used to the system they have sent you first and that requires time in itself. The services I have noticed can vary quite widely in terms of speed and some have limited options in auto-completion and auto-importing libraries.
  • Talk me through it – I enjoy this and your knowledge is picked on how you think about the problem/task rather than focusing on your coding ability. Anything that you mention can be drilled on so be sure of what you are saying and don’t dig a hole. The problem with this is that there is a huge degree of freedom in it and can be harder to assess candidates.

How to Prepare

I usually look up on Glass Door (https://www.glassdoor.com/) information about the test or ask other testers if they have encountered the interview first. The more information you have on the exact task the deeper you can prepare. If you have no information then you can still practice by doing some coding tasks.

  • Simple project – To practice I have created a simple project and challenged myself with small tasks without the use of Google. If I fail and need to look something up I restart the task and program it all over again. This trains not only your memory but makes you quicker at typing and using your IDE. Anything which is wrong is promptly revealed when you run your application. Once you have a project up and running it’s quite easy to do new tasks. I have listed some below to get you started:
    • Create a main method to print Hello World
    • Create a simple class – can you create a car class for example from scratch without Google?
    • Can you use inheritance – can you extend the class?
    • Can you add a unit test
    • Can you use an array list
    • Can you use a Hash map
  • Hacker Rank problems – To train on some problems and how to use an online service I have used hacker rank in the past. It’s a well-known service in the industry and you can get used to other systems with this. Try out one of the initial problems and solve it. If you want the extra challenge, time yourself. This will get you to think about problems quicker and help your thought process.
  • Know your CV – You should know your CV inside and out and be able to explain the last 2 years with examples. This doesn’t have to be a boring task and you should present the stuff you are most proud of.

General Knowledge

For java there is a long list of general knowledge questions you need to know. You will also need to understand the SDLC, testing foundation knowledge, and various bits for API testing and UI testing. Below is a dump of what I would look up:

  • Interface – a type of abstract class with no methods implemented. Forces the developer to create those methods for an object to use that interface.
  • Streams –  a stream is a wrapper around a data source to make bulk processing more convenient and fast. 
  • Thread – single sequential flow in a system
  • Error codes
    • 1xx –  informational
    • 2xx – success
    • 3xx – redirection
    • 4xx- client error
    • 5xx. – server error
  • Examples of error codes200 success, 400 bad request, 404 missing URL, 301 moved permanently, 500 internal server error
  • API – application programming interface – integrates other software without knowing the internals 
  • REST API – stateless communication,  where the client manages the state
  • REST – Representational state transfer
    • GET – retrieve values
    • POST – create a new object
    • PUT – update the entire object
    • PATCH – update only part of the object
    • DELETE – delete an object
  • Data Structures
    • ArrayList – dynamic array
    • Linked list – doubly linked list
    • Set – unique set of data 
    • HashMap – Key, value structure (dictionary)

Java keywords

  • Static class – cannot be instantiated or inherited and methods can be called from the class itself
  • Switch statement – an easier and cleaner way to program compared to multiple if statements
  • Constructor – special method used for only instantiating the object
  • Abstract –  the class cannot be instantiated
  • Composition –  way of using “has a” relationship. Basically adding an object onto another object through an instance variable. Like a car has an engine
  • Interface – an abstract class that cannot be instantiated. It allows you to dress an object as another object. 
  • Serialization – object to a stream of bytes – used in API testing for converting an object to JSON
  • Deserialization – stream of bytes to an object – used in API testing for converting JSON to object
  • Optional object – object on missing values if you are using POJOs otherwise use jsonpath filtering and if not present assert on nothing.

OOP – 4 primary concepts

  • Abstraction – separation of a system into different objects, inheritance is a form of abstraction.
  • Inheritance (a form of abstraction)- subclass can inherit all the methods and variables from a parent class. Removing common traits from an object and putting them in a parent class so you are following the DRY principle.
  • Encapsulation – Getters and setters – Form of data hiding to control the use of variables in a class from outside classes. 
  • Polymorphism- methods existing in different forms or states
    • method overloading – multiple methods with the same name in the same class but different arguments.
    • method overriding  – overriding a superclass method to suit the child class 

Libraries

  • Rest Assured – library to test and validate rest apis 
  • JSON PATH- java library to easily extract values from JSON-formatted messages

Software Testing Knowledge

  • The Testing pyramid – Unit testing at the bottom, component testing, integration testing, end-to-end testing (top). The pyramid represents the ratio of tests you should have. The smallest tests like unit needs to have the largest amount of tests as they are quick and cheap. The largest are end-to-end tests and should be a small set as they are big and long to run.
  • boundary value analysis – test on the boundary of a value for an implementation for example a webiste is released on the 3rd of March. You would perform testing on the 2nd, 3rd, and 4th of March, before, during, and after to make sure the site is released a the correct time.
  • black box testing – Treat the system as a black box and know nothing of the internals (e.g. end to end testing)
  • white box testing – Tread the system as a white box where you understand the internals (e.g. unit testing)

SDLC

  • shift left testing– testing earlier in the cycle of a software development project. Ideally on the creation of tickets.
  • waterfall – old software lifecycle, prone to problems and late delivery
  • agile – A set of principles to follow in a project.
    • scrum – used for projects. Use of sprints, retros, standups
      • standups
      • retros
      • backlog refinement
      • sprint planning
    • kanban – used for Business As Usual.
  • wagile – A combination of waterfall and agile, generally used in big companies where corporate project planning can’t die.
  • 3 amigos – developer, tester, and business analyst

Design pattern

  • singleton – limit the creation of the object to just 1.
  • Factory – pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created.
  • Page Object Model – used in UI testing to represent web pages.

Coding principles

  • DRY – don’t repeat yourself
  • KISS – keep it simple stupid

Summary

Hopefully, this gives you a guide on what you need to know for the SDET interview and can help you prepare for it. Be confident in your answers even if you aren’t sure I would say that if you have studied well then one or two answers won’t stop the interview. The interviewers are aware that most of the general knowledge stuff can be looked up they just want to understand your level and if you are capable.

Leave a comment