Example (15)

Search/Replace in Linux

Search and replace on multiple files in multiple directories is really easy in Linux:-

find *enter directory here* -type f -exec sed -i 's/*enter search string here*/*enter replacement string here*/g' {} \;

find /home/jaffamonkey/testfiles -type f -exec sed -i 's/I am a nerd/I am a geek/g' {} \;

PhantomJS for Performance Testing

I am quickly becoming a real fan of PhantomJS, which as well as being an AJAX/Javascript headless browser, interacts with other equally smart tools. To do a basic performance test, use phantomJS in conjunction with yslowJS and confessJS.

Test Strategy Example

Test Strategy exampleTest strategies are often omitted because no-one ever reads them. And why aren’t they read? well, sidestepping “laziness”, it’s that too often they are unhelpful. So instead of sighing and drumming up something useless, why not generate something useful instead. Click here to view example of a risk based test strategy.

_VIEWSTATE and performance issues

Viewstate represents the state of the page when it was last processed on the server. ViewState is used to track and restore the state values of controls that would otherwise be lost, either because those values do not post with the form or because they are not in the page html.

Selenium and proxies

It is common when trying to automated web tests within company, you will be behind an HTTP proxy that requires authentication. To get round this, you have to specify the proxy details when starting Selenium.