Skip to main content

Posts

Showing posts from September, 2014

Stray process cleanup in your test automation suite

Occasionally any large test automation suite leaves some stray browser and/or webdriver processes behind during test execution. They make our test suite slower and cause other issues, for example a stray process process may hold entire directory and prevent it from cleaning. Clean test environment is very important for test isolation and prevention of false positives. This is an example of process cleanup in Linux where we find the processes in question by their names and kill them. And here is another example where we do the same process cleanup in Windows Powershell.

Using SED and TR tools for text manipulations

SED and TR command line tools are very useful tools to perform various text manipulations in Linux. You can also find them on Mac OS X, however be aware that they could work a little differently from the same tools on Linux OS. Two very simple, but extremely useful one-liners (tested on Linux Ubuntu OS). The first one is wrapping your text with a div tag and "lazyload" class, also it wraps the text into HTML comment tags. The second one-liner is removing all newline characters from the text.