1. A method for detecting at least one vulnerability in an application, the method comprising: adding at least one test code to a code segment of a web application running on a tested unit while the web application is running, wherein the at least one test code is adapted to generate security related data in response to at least one monitored execution event of the web application, and wherein the security related data includes at least some data associated with the at least one test code for a particular vulnerability; logging the security related data with other security related data generated by the at least one test code during the execution of the web application, wherein the other security related data is generated in response to the execution of the at least one test code; analyzing the logged security related data; detecting a presence of at least one vulnerability in the web application based on the analysis of the logged security related data; and reporting the presence of the at least one vulnerability in the web application as detected based on the analysis of the logged security related data.