Getting rid of unwanted background processes

I am a Software Automation Engineer at DELL EMC and earn my bread and butter by automation. I am on a mammoth project of Virtustream. I am passionate about designing Automation Frameworks that are effective and easy to maintain. For automating websites, my weapons are Selenium (Webdriver) and JMeter.

Easier said than done, these are open source tools. It is difficult to have the support as expected compared to the commercial tools. I don’t deny the value they deliver to the company, but pose serious challenge when one runs into a problem.

Today, as I ran my automation scripts over remote server for Selenium, the DevOps team got highly pissed off and disabled my server jobs immediately. My scripts, though were closing the browser after the execution of test, the background processes of chromedriver sessions remained open, causing major chunk of memory consumption. I happened to have a look at task manager, this is similar to what I saw there:

ind a

This not only increased memory consumption, it went on to hamper other tests being run on the server as well. No, doubt DevOps were after me. I had to find a solution before the next scheduled run, and get back on the saddle to fight another challenge. So as usual, I googled. I came across a wide range of small products which claimed to get rid of the background processes. Ready made product would be the last resort I felt.

As he rightly said..

I wanted something that could be as simple as a batch file which would be triggered once all the tests have run.

Finally managed to hit the right google search, and came up with this one:

taskkill /f /im chromedriver.exe

Yup, that one was me after the solution worked.

And that was my friend’s reaction, when I had sought her help, who largely remained busy with her own task. :(

That’s all it needed to kill the background processes associated with the unwanted chromedriver sessions. So, another challenge surpassed it was. Felt good.

Now that I think of it, these background processes are no better than the thoughts in our life. We keep them running without ever realizing that they are affecting our performance. We may need them or may not, yet we forget to understand, the ones to keep and which ones to discard. Food for thought?!