Tuesday, September 25, 2012

How to handle c/c++ memory leaks and access violation issues


Currently I'm working on my M.Sc  Research and I'm implementing my research tools using C++ ( together with  Qt, OpenCV, Boost and Intel TBB libraries). One of the biggest challenges is to overcome the run time exceptions coming due to memory leaks and access violation issues due to threads and poor memory management. Hence I though of posting my personal experience as this would be very helpful to the c/c++ programmers.


Following are the well-known tools that you can use to investigate memory leaks, uninitialized variables, and other run time issues.


and may more you can find via this link


If you are using windows and using Visual Studio then my recommendation is go for VLD ( Visual Leak Detector )

http://vld.codeplex.com/wikipage?title=Using%20Visual%20Leak%20Detector&referringTitle=Documentation

Monday, September 10, 2012

How to setup the slow mode in Selenium RC using Java


How to setup the slow mode in Selenium RC using Java ?

I came across this issue several times when automating test scripts using Selenium RC & Java. In many instances you need to use the slow mode (especially when dealing with the dynamic components) in-order to run your script smoothly.

Following method can be used to set the selenium slow mode by pausing each and every step by limiting in to a specific time period (in milliseconds)


 //define a public string with the time limit you need to pause every step in milliseconds  
 public String timeout="6000";  
 //Add the initial steps to start selenium  
  RemoteControlConfiguration rc = new RemoteControlConfiguration();  
  seleniumserver = new SeleniumServer(rc);  
  selenium = new DefaultSelenium("localhost", 4444, browser, "http://");  
  seleniumserver.start();  
  selenium.start();  
 //Once the server is started then set the default timeout period ( in-order to emulate the slow mode )  
 selenium.setSpeed(timeout);