How to pass a coding interview as an automation developer

Coding Challenge

If I need to use any of the helper methods in the

Congratulations! You are on your way to programming better than whatThe Coding Horrorobserved in the2007 blog postWhy Cant Programmers … Program?

Data breach​ ​cost​ ​estimates get it wrong: What you need to know

Although Iwork dailywith theJava programming language, its rare when I have to use a data structure more intense than a hashmap, and even that is rare.

The code I write revolves around Selenium WebDriver: I opena browser, goto a page, enterdata into text boxes, selectradio buttons, and pulltext from the screen.

To find the last character, we could use:

And whiteboard coding testsarethebest solution they can come up with.

Just before new code has been merged into the main codebase

Testing in the Agile Era: Top Tools and Processes

If you cant solve them, look at the officialdocumentation of the programming language and see which built-in language methods will help you out.

It was as if I were interviewing for a job that required fluency in Spanishand made the claim that I knew the languagebecause I studied it in high school and college. If I was asked to write a few grammatically correctparagraphs on a whiteboard about a random topic, such as that mornings breakfast, would I be able to do it without an English-to-Spanish dictionary or a phrasebook?

All numbers divisible by three and five ( i % 3 == 0 && i % 5 == 0 ) (and one more time to cement it in your brain!)

How to deal with the DevOps talent crunch

Press the Start Button on the stopwatch web app, then attempt to answer the following question:

Two years with no testers: What I learned

Practice making your handwriting legible.

Note: If your interviewers come up with different requirements, your test cases and code should reflect them.

After getting through only half of the assigned problem, I joked with the interviewers:

Ifthe first character s.charAt(head) is

Take away IntelliJ and StackOverflow, my own personal English-to-Java dictionary and phrasebook, and if you put me on the spot, I couldnt easily write the paragraphs of code my interviewers were looking for.

When counting through characters in a string or the first index of an array, if there are

Take your initial test cases and try to imagine what would happen if you ran them. Personally, I like rewriting the tests in a JUnit formatasAssertstatementsbut this is not required.

30+ resources for modern IT Ops professionals

Gaining basic fluency in a programming language and being able to demonstrate it will not happen overnight, but it can happen. Heres how to proceed:

A software quality assurance engineer is an end-user advocate, crafting the software testing process so it ensuresqualitymeeting and exceeding the wants and needs of the stakeholders on the project.

What types of tests do we run? Do we focus onautomatingour browser regression test suite with Selenium WebDriver? Or do we automate the new functionalitytoo?

How do you find if a string is a palindrome?

Practice a little bit at a timemaybe 15 minutes a day. You want this information to move to long-term memory, so you can recall information even during extreme interview stress.

Oh dear. Oh, I was not ready for this.Not even close.

Heres what I hadnt realized when I went on that first coding interview. The two stone-faced developers observing me having a brain freeze and getting flusteredin front of the whiteboard werent just silently watching. They werewaiting.

Feel free to share your favorite coding question sites and the crazy interview questions youve fielded in the comments below.

How to maintain software quality when scaling DevOps

All integers from 1 to 100 (start with something easy)

1. Whiteboard question topicsmaybeoutside your wheelhouse

Ask: The wordsracecar and noon are considered palindromes in this exercise. How about, A man, a plan, a canal: Panama or Madam, Im Adam?How about a blank string? Or a string with one letter?

If the first character s.charAt(head)

We are looking for a string and its reverse to match exactly, character by character.

Dont go through all this effort just to pass a whiteboard test. Aim higher! Make your goal to be a better programmer.

Ask: What do you mean by the word palindrome?

The challenges and techniques behind successful application development and delivery.

Unfortunately, all of my on-the-job training had not prepared me to answer the questions they were asking. How in the heck would I ever be prepared?

If I am stuck when writing a test, I review Alan Richardsons course,Selenium WebDriver with Java, or Dave HaeffnersElemental Seleniumfor inspiration. Or if I want some automationawesomeness, I listen to Joe ColantoniosTest Talkspodcast.

Lets go through this evaluation process, looping through characters while the head is smaller than the tail.

No, most of the coding examples they are asking for are very basic programming questions dealing withloops, some basic math, and some string and character manipulation.

How modular regression helps QA teams hit moving targets

The automation role has moved over the past few years fromtesters who can codeto coders who can test,leaving manual testers in the lurch.

Because there is such high demand for automation developers, interviews for QA roles look slightly different than they did two years ago.

Get fresh whitepapers, reports, case studies, and articles weekly.

Automating the testing process means that in a continuous integration/continuous delivery(CI/CD)environment, such as with Jenkins,tests can be run:

To find the length of the string, we can use the methodlength().

will count 0, 1, 2, 3, and 4, but will not go to 5. That 5 is where the loop will terminate. If you were outputting this to the screen, you would see 0, 1, 2, 3, and 4. Make it

When they instructed me to write a method to find if a given string is a palindrome, they were waiting for me to:

And if I am really stuck, there is .

To become truly fluent in a foreign language, you must build up your vocabulary.Likewise, to become fluent in a programming language, you need to study the vocabulary listed in the Java API documentation.

Yes. Seriously. Attempt to answer the question. Ill wait.

object, all I need to do is type a period after the word, and methods are on display. I can just experiment with them to see what they do.

Provisioning, deploying, monitoring, and managing IT systems

Check your email for the latest from TechBeacon.

Take out a blank piece of paperand a pen.

We can use the helper method in JavasStringobject,charAt(int i).Enter the index of the string into the method, and it outputs the character at that index:

To prepare for coding interviews, Ive builtupmy fluency in Java using some of the tips below. You can take similar steps for any programming language:

After that first whiteboard test, I came to a hard realization: After relying on all the tools and techniques I mentioned above, I didnt have the basic Java fluency that I thought I did.

How AI is changing test automation: 5 examples

Essential Java ClassesLessons on exceptions, basic input/output, concurrency, regular expressions, and the platform environment.

Do candidates come up with enough edge cases to test their code? How thorough are they?

Docandidates immediately jump into the code, possibly not realizing that the specs are unclear, or do they take a step back, examine the problem and gather the requirements?

How developers can take the lead on security

Software developers dontconsider thequestionsthey are asking automation developersto be difficult. They arent asking candidates to solve theTower of Hanoi, John ConwaysThe Game of Life, or atic-tac-toesimulation or toshuffleadeck of cardsor do any of the other projects they did as computer science majors. And they arent asking the really hard stuff, such as the math equationsfromCLRSIntroduction to Algorithmsor the Gang of FoursDesign Patterns: Elements of Reusable Object-Oriented Software.

9 ways organizations screw up continuous delivery

Serverless vendor lock-in: Should you be worried?

Can we go one level deeper onMike CohnsTesting Pyramidand test the web services that provide the underlying functionality to the browser application, supplementing the developers unit and component tests?

If your main programming language is Java, take a look at especially methods for the classesIntegerString, andCharacter. Here are samples:

If you had trouble with this question, if your paper is mostly or completely blank, if your forehead is covered in flop sweat, or if your first thought was, Why are you forcing me to do this? Im an automation developer,not a coder! this article is for you.

Open up a browser and Google the keywordstopwatch.

Completely new to the Java language? Has it been a while since college?

There is one weird trick to learning a programming language:Practice writing solutions down on paper.

When I showed my palindrome solution to my friend Joon, who is asenior developer, he grimaced: Why are you using English words like, head or tail? And a while loop? Isnt a for loop enough? Rewrite the code to do away with that.

How to deal with the rising rate of vulnerabilities

And yes, interviewerswill give hints, if the candidate hasdone well so far. (

An automation developerwrites the automated testsandassembles anautomated test frameworkto support execution and analysis of the tests, attempting to answer the following questions:

When I found myself in my first interview after a two-year break, everything seemed to be going well … right up until I was asked to approach the whiteboard.

Check to see if your local library or your college alma mater offers subscriptions toMembers of the Boston Public Librarycan get a free subscription m, the online education company. TheThomas Crane Public Libraryin Quincy, Massachusetts,has free subscriptions,too. I loveDavid Gassners course on Lynda,Java Essential Training, which covers a good six hours of material.

Blank strings and strings consisting of one letter (and one character) are all palindromes. Madam, Im Adam, for the sake of this exercise, is not.

Make sure to ask what is and is not a palindrome!

If we give the candidates hints, will they pick up on them? Can they listen to other peoples opinions that may be different from theirs? Can they work with people who may be more senior than them?

TechBeacon uses cookies to give you the best online experience. If you continue to use this site, you agree to the use of cookies. Please see ourcookie policyfor details.

Eh? Nothing about using Firefox,Firebug, andFirepathto find the elements on a page? Or writing codeinIntelliJ IDEAorEclipseto spin up a browser, go to a login page, entering a username and password into a textbox, and clicking on a login button?

equal to s.charAt(tail) we start evaluating the next set of characters, moving the head up by one, and the tail down by one.

. This means the very first letter is ( 0 ), and the last one is (length – 1).

Dont do cram sessions. That merely storse the information in your short-term memory.

Need to find the first character in a string?UsecharAt(0).If a character or word is in the string? Usecontains. Need a suffix? TryendsWith. Check if two strings are the same withequalsandequalsIgnoreCase. You can see if a stringisEmpty(), or uselength()to see how many characters are in the string. You canconvert the stringtoCharArray(),toUpperCase(),toLowerCase(), or eventrim()the whitespace in the beginning and the end of the string. Remember that double quotes should wrap a string.

Two years with no testers: What I learned

3. Whiteboard tests dont allow you to use outside sources

I thought I would be reviewing automated test code I had already written, not coding in real time.

Automation first: How to get your enterprise ChatOps-ready

for (int i = 0; i len / 2; i++)

Learning the Java LanguageLessons describing the essential concepts and features of the Java Programming Language.

Does the candidate sketch out the problem, talking out loud so the interviewer can get a sense of the candidates thoughts on solving the problem?

The API test frenzy: Mix it up for a better testing strategy

2. Whiteboards dont have IntelliSense

: After adding thenew features,painstakinglychecking thatthe entire application is still working as expected from the end users perspective. Testing a web app? What is the end-user experience inChrome, Firefox, Internet Explorer 11, IE10, IE9, IE8,MicrosoftEdge, and Safari on the Mac?

Using your favorite programming language: Write a method that checks to see if a given word is a palindrome. Example palindromes: noon and racecar.

Thesoftware developers think they are setting the bar quite low. They want automation developers who are fluent in the basic features of a programming language.

Finally there are many sites out there where you can practice taking coding tests, including these two:

Selenium WebDriver, coupled with CI/CD, created such a tidal wave of demand for coders that the phrase manual testing has been pretty much swept away from job requirements. In its place?Automation development.

Using your favorite programming language: Write a method that checks to see if a given word is a palindrome.

Because automation developers are now software developers.

Automated testingisnt a new conceptin the software industry. Giving automated testing tools away for freein orderto make the worlds software betterisnt a new concept. Whatisnew is thatSelenium WebDriverincubated by ThoughtWorks and fostered by Googlehas made open-source solutions palatable even to the no-risk companies working solelywith certified, off-the-shelf software tools.

How to embrace you build it, you run it

I might have been able to figure it out had it been a take-home test. But when it was just me, the whiteboard, adry-erase marker, and two stone-faced software developers observing and judgingme, my mind was turninginto a complete and utter blank.

Are you an automation developer looking for a new position? Lets simulate the experience of a coding interview:

When I am starting to write a test regarding functionality I am not familiar with, I love bouncing ideas off my teammates to make sure Im not barking up the wrong tree. But during a job interview, I cant bounce ideas off the interviewers. Or can I? I mistakenly assumed that I couldnt.

The blockchain hype cycle: A reality check for the enterprise

All even numbers ( i % 2 == 0) within that range of 1 to 100 1 … 100(hard if you dont know the mod operator)

With software developers now a major part of the interview process, they are screening automation developer candidates to make sure they have at least a basic understanding of the fundamentals of the language in which they will be coding.

is not equal to s.charAt(tail) then it is not a palindrome. Return FALSE.

How to deal with the DevOps talent crunch

I would like to receive emails from Tech Beacon and Micro Focus to stay up-to-date on products, services, education, research, news, events, and promotions.

The new philosophy is that the code for automated tests should have quality standards that match the standards forproduction code.If they dont stick to the best practices of object-oriented programming, companies might end up with a testing framework that is hard to read, hard to understand, and hard to maintain. Techniques ofencapsulation, inheritance, abstraction, and polymorphism will be harder to teach if automation developers dont have basic fluency in a programming language.

Getting StartedAn introduction to Java technology and lessons on installing Java development software and using it to create a simple program.

LocationSmart is security-dumb. Cell carriers are guilty too

: Writing code thatchecks to see if the expected behavior matches the actual behavior of the application. Essentially you want to automate the regression test suite.

Everything fine? In the end, return TRUE.

How did you do? If you solved those problems, you are closer thanI was the first time around trying to solve the palindromeproblem!

Just before a release to production

Why serverless computing is not ready for prime timeyet

Using your favorite programming language: Write a method that checks to see if a given word is a palindrome. Example palindromes: noon and racecar.

I do string comparison all the time, checking if the alert text on the screenis the same as what is expected, but I only use a few of the string objects helper methods in my day-to-day job.

Attempt to solve them with a pen and paper.

The boolean methodsisLetter,isLetterOrDigit,isLowerCase,isUpperCase,isLowerCase, andisWhitespacehelp investigate the nature of characters. Example:Character.isLetter(A)would be true. When declaring new characters, wrap them in single quotes, such aschar newCharacter = a.

Make sure to use matching open and closecurly braces and parentheses.

As long as I limited the Java conversation to Selenium WebDriver, Id be able to hold my own.

Take a look at OraclesJava Tutorials:The Java Tutorials are practical guides for programmers who want to use the Java programming language to create applications. They include hundreds of complete, working examples, and dozens of lessons. Groups of related lessons are organized intoLearning trails.

How to embrace you build it, you run it

All odd numbers. ( i %2 != 0) (build on what you just practiced)

As part of anhourly runregression test suite

WithSwitching careers in QA: From manual testing to automation developmentandFirst days as an automation developer? Take my advice on balancing dev, QA, I covered a bit about automation, but lets recap:

: Exploring the productusing the same tools the customers will use: a keyboard, a mouse, or fingers on a touch screen. (

Interviewers are checking to see how thorough you are when debugging. (

Your solution should be casesensitive. An uppercase R should not match a lowercase r.

Their response: All employees are expected to meet a certain minimum standard of coding knowledge,even for quality assurance positions.

if ( s.charAt(i) != s.charAt(len – 1 – i))

A lot of folks in the industry also think we should do away with them:

Take, for example, thestring s = noon.

The coding interview strikes fear into the heart of even the most senior software developers, and much has been written about how to prepare for them and pass them:

Testing in the Agile Era: Top Tools and Processes

The blockchain hype cycle: A reality check for the enterprise

Want to convert an integer? Input the integer into Integer.toBinaryString(int i),Integer.toHexString(int i), orInteger.toOctalString(int i) to convert it to the format you are looking for.

Read the documentation and lessons. Make up simple homework examplesand solvethem on paper. For example, you could ask yourself how to use aforloop to print out:

Before we walk through a solution to a coding problem, you might wonder…

Continuous software delivery that unites development and operations teams for faster business results.

Joonsmiled: See! You just did the same thing as your first example, but there is less code. That is a good solution.

All things security for software engineering, DevOps, IT Ops teams.

Find basic coding problems on the web.

How to use AI to fight identity fraud

One of a QA engineersresponsibilities is software testing, validatingwhether the new features added to aweb or mobile applicationmeetthe designated requirements and design specifications.

How AI is changing test automation: 5 examples

Try this exercise for at least a good 60 seconds, even if you think you cant do it. Dont give up!

Why AI is the perfect software testing assistant

Why are automation developers being screened ascandidates in the same way as developers? The answer was a strange concept for me to grasp:

Try to come up with tests for your code. What happens if you feed different strings into your method that findthe first character or last character if it is an empty string? Does it work if there is one character in the string? Twenty characters? Fifty?

Come up with your own solution first before seeking out a better solution elsewhere. If you do your own research and investigation, chances are the information will stick in your mind permanently.

If you were trying out anew vocabulary word, you would try it out in a sentence.When using a new method in one of the Helper objects, try it out in a block of code.

Most important,watch out foroff-by-oneerrors:

All numbers divisible by three ( i % 3 == 0) (once moreunto the breach, dear friends!)

If we useSelenium WebDriver to automate browser tests, do we pair it with Java, Python, C, JavaScript, or Ruby? WhichSelenium bindingsshould we use?

Can candidates spot errors in your their owncode without the interviewergiving many hints?

Why are coding interviews so difficult?

When I was interviewing two years ago, only once did I comeacross acoding interview. This time around? Eight out of nine positions I for which I interviewed included it.

Imagine coding as a foreign language:

We started the count at 0, so the last character would be the length minus 1.

What testing solutions are perfectly paired to the programming language of the app, such asProtractorwithAngularJSapps?

Lets call the first character the head and the last character the tail.

And that, my friends, is how I started my new job search.

Leave a Reply