How to Read and Write the data in Notepad

This post helps you to Read and Write Data in Notepad. This is so simple. By using two classes FileReader, BufferedReader we can read data.

Browser compatibility testing using Selenium and TestNG

Cross Browser Testing : Is to check that your web application works as expected in different browsers.If we are using Selenium WebDriver, we can automate test cases using Internet Explorer, FireFox, Chrome, Safari browsers. To execute test cases with different browsers in the same machine at same time we can integrate TestNG with Selenium WebDriver.

How to create custom firefox profile in Selenium WebDriver

Why create a new Firefox profileA profile in Firefox is a collection of bookmarks, browser settings, extensions, passwords, and history; in short, all of your personal settings. When you want to run automation reliably on a Firefox browser.
It is advisable to make a separate profile. Automation profile should be light to load and have special proxy and other settings to run good test.
You should be consistent with the profile you use on all development and test execution machines. If you used different profiles everywhere, the SSL certificates you accepted or the plug-ins you installed would be different and that would make the tests behave differently on the machines.

Open your Firefox browser And follow the steps.

How to set the language using Selenium WebDriver

Internationalization is a process of designing a software application so that it can be adapted to various languages and regions without any changes

Localization is a process of adapting internationalized software for a specific region or language by adding local specific components and translating text.

If we want to check whether our application is properly internationalized , then we will manually change the language preferences in the browser itself. But if we want to check the same using WebDriver then we have to change the user language preferences.


What is API :
An application-programming interface (API) is a set of programming instructions and standards for accessing a Web-based software application or Web tool.

Example :

An API is a software-to-software interface, not a user interface. With APIs, applications talk to each other without any user knowledge or intervention. When you buy movie tickets online and enter your credit card information, the movie ticket Web site uses an API to send your credit card information to a remote application that verifies whether your information is correct. Once payment is confirmed, the remote application sends a response back to the movie ticket Web site saying it’s OK to issue the tickets.

Basic concepts of API (Application programming interface)

What is SOAP?
SOAP stands for Simple Object Access Protocol. It is a XML-based protocol for accessing web services. It is platform independent and language independent. By using SOAP, you could interact with other programming language applications. It is independent of the Transmission Protocol (could be HTTP, FTP, TCP, UDP).

SOAP relies exclusively on XML to provide messaging services. Any XML can be a SOAP if it contains the following:
The wrapping of the XML inside of a SOAP body
The wrapping of the SOAP body within a SOAP envelope
The optional inclusion of a SOAP header block
XML Namespace (xmlns) is required to indicate that this is a SOAP Request
Encoding style directives for the serialization of data
The binding of the whole thing to a protocol


Here I am trying to monitor system usage and the performance with different browsers which we use in selenium (Firefox,Chrome,Headless Browser). Just wanted to know how it works. Generally we never use this method. Whenever you execute your test cases, there would be load on your system.

Performance factors :
Important influence factors to the performance of any Java program can be separated into two main parts:

1.Memory Consumption of your program

2.Total runtime of your program

How to add extensions firebug firepath to the instantiated firefoxdriver

In general when we Instantiate a Firefox Webdriver, the extensions(firebug,firepath) would not be added in that browser. In order to add them we can set firefox preferences by downloading XPI’S.
Wait..! but why do we need to add firebug? The answer is simple, I just want to measure network latency of AUT in each browser. Maybe you call this as APM (Application performance Monitoring)

What is XPI : A file with the extension XPI (pronounced zippy ) contains a Firefox browserextension.These are very similar to zip files.

FireBug XPI : Download from here,Place it in your drive.

FirePath XPI :Download from here,Place it in your drive.

How to Zip your Test Automation Reports using Java

We can use this Class in Selenium to Zip your Test Automation Reports and mail them to anyone. We can use this for adding a file or a folder to the archive list. This Class is based on Java util & io Packages. In general we use Jenkins or some CI tool by adding plugins for auto mailing.


Framework: It is a set of Guidelines designed by an Expert in a generic way to accomplish a task in an effective and efficient manner.If you are using selenium webdriver and wants to create Keyword Driven Framework from scratch then follow bellow given steps.It will guide how to create hybrid framework .

Keyword Driven Framework is one of well known automation framework and extensively used in various service offering companies. Keyword Driven Framework also known as table-driven Framework or action word based framework.Here we’ll use some keywords as the driving parameters in data driven testing the data sheet. The keywords will be defined by the user, and let’s call them user defined keywords.The highlighted text in the below screenshot are the keywords.

Selenium Generic Methods (Framework Independent)

We all know, It’s always good to have reusable methods in your framework. Creating methods for every action to be performed on a webpage is not so easy while automating using Selenium. In order to suppress, we can create a class where we could store all the methods which are useful for your project. So I have created a Class ‘Utils’ under ‘utilty’ package & in this class, i’m gonna create static methods (creating an object is not required) and i’ll call these methods wherever i need them.This would be so simple to call (Syntax: ClassName.MethodName) these reusable methods.I just created these methods to make you understand, method names can be changed though.You can get the code by clicking HERE.


Selenium Grid helped me a lot in Compatibility check (Multiple Browsers & Multiple Platforms).This is grid helps us to execute multiple instances of WebDriver in parallel which uses the same code base (code which is present in only one system), hence the code need NOT be present on the other system they execute. The selenium-server-standalone includes Hub, WebDriver, and Selenium RC to execute the scripts in grid.

Selenium Grid has a Hub and a Node. Each hub may have many nodes.

Hub – The hub can also be understood as a server which acts as the central point where the tests would be triggered. A Selenium Grid has only one Hub and it is launched on a single machine once.
How to start Hub : java -jar selenium-server-standalone-2.42.2.jar -role hub


What is Saucelabs?Sauce Labs is a cloud platform for executing automated and manual mobile and web tests. Sauce Labs supports running automated tests with Selenium WebDriver (for web applications) andAppium (for native and mobile web applications).

Why do we need Saucelabs?Straight forward answer : Browser Compatibility. We need to test all our testcases in various versions of browsers and various platforms too. We can’t install all those stuff in our local box. Now this Saucelabs plays a major role.


What is Compatibility Testing?
Compatibility testing is a non-functional test to ensure that an application’s compatibility within different environments such various web browsers with various versions, Operating Systems (Windows, Linux, Mac…). In order to pass this test, we also need to check Forward and Backward Compatibility. Here i’m using Browserstack to perform Compatiblity testing.

BrowserStack allows users to make manual and automation testing on different browsers and operation systems.To execute your test scripts using BrowserStack, you need to set parameters of Browsers and Platforms.
There are few steps to be followed to integrate Selenium with BrowserStack.


We all know, designing a framework is a tedious task. So, this time I came up with an article on new framework RedwoodHQ, a Tester friendly with many built-in features and allows you to automate and manage your tests very quick.

What is RedwoodHQ?An Open source framework which supports Selenium, Appium and allows multiple users to design test cases and develop test scripts which can be written in a ubiquitous language and also allows you to execute them all using a friendly Web interface.
RedwoodHQ supports Java/Groovy, Python and C#.

Why should I use RedwoodHQ Framework?Using this framework, a non-tech guy can automate using the keywords available while designing the test case itself. We don’t need any IDE to configure. I guess this can be used for Bigger and Smaller projects as well.

What is Vulnerability Assessment?

Vulnerability assessments are necessary for discovering potential vulnerabilities throughout the environment. There are many tools available that automate this process so that even an inexperienced security professional or administrator can effectively determine the security posture of their environment. Full exploitation of systems and services is not generally in scope for a normal vulnerability assessment engagement.
Systems are typically enumerated and evaluated for vulnerabilities, and testing can
often be done with or without authentication. Most vulnerability management and
scanning solutions provide actionable reports that detail mitigation strategies such as
applying missing patches, or correcting insecure system configurations.
Vulnerability identification allows you to do your homework. You will learn about what
vulnerabilities your target is susceptible to so you can make a more polished set of attacks. 

What is Website Defacement?

Web  Defacement  attack  the  invader  changes the  visual  appearance  of  the  web page.  The  business  competitor, Insurgent  and  extremist  groups  defame  the  reputation  of  the organizations  and  mislead  public  through  these  types  of  attacks. Manual  monitoring and scrutinizing these attacks on web sites is a time consuming and tedious task for law enforcement agencies. Hence  there  is  a  need  to  develop  a system  which  effectively monitors  the  content  of  web  sites  and  automatically  generate alarm  for  any  suspicious  or  threatening  activity. 
Basically, websites are defaced by exploiting the vulnerabilities in
the web server and gaining root shell injecting malicious coded into the target page residing on the server.

What is Pharming Attack?

Pharming : is a sophisticated technique that allows automatically re-directing a user to a malicious site. It means, it redirects you to some malicious website without your knowledge. It's quite embarrassing huh.

What is IP Sniffing and Spoofing

Sniffing and Spoofing are security threats that target the
lower layers of the networking infrastructure supporting
applications that use the Internet. Users do not interact
directly with these lower layers and are typically
completely unaware that they exist. Without a deliberate
consideration of these threats, it is impossible to
build effective security into the higher levels.
If the network packets are not encrypted, the data within the network packet can be read using a sniffer.

What is Phishing?

Phishing (sounds like fishing), is a social engineer attempt to get the targeted individual to disclose all the personal information like user names, account numbers, sensitive data and passwords. This is often done set up fake web sites that mimic original, emails from corporations, banks, and customer support staff. Other forms of phishing attempt to get users to click on hyperlinks that will allow malicious code to be installed on the targets computer without their knowledge. This malware will then be used to remove data from the computer or use the computer to attack others. Phishing normally is not targeted at specific users but may be everyone on a mailing list or with a specific email address extension, for example all the users with extension “”.

Security Testing Methodologies

Security Testing should be done in a standardized process. It cannot be tacked on to an application at the last minute. A proper security framework should include continuous security training for all developers, threat models for the entire system, regular code reviews and frequent penetration testing.

What are the types of penetration testing?

Types of Penetration Testing :

  • Black Box Penetration Testing
  • White Box Penetration Testing
  • Grey Box Penetration Testing

Black Box TestingThe main differences are that with black box testing the testers are given very little or no information prior to the penetration test. It is also referred to as "blind testing" because the tester has to find an open route to access the network.

What is a Vulnerability, Payload and Exploitation?

What is a Vulnerability?

A vulnerability is a security hole in a piece of software or hardware which can provide a potential vector to attack a system. Thus to compromise a system the first step is to find a vulnerability in that system. In simple words a vulnerability is just the weakness in the software that allows an attacker to gain control.

What is Penetration Testing and Why is It Important?

Penetration Testing (pentesting or security testing) is the process of testing your applications for vulnerabilities. An effective penetration test will usually involve a skilled hacker, or team of hackers. The testers not only discover vulnerabilities that could be used by attackers but also exploit vulnerabilities, where possible, to assess what attackers might gain after a successful exploitation.

What are the commands used in Linux?

This section gives insight into the most important commands of your linux system. To open terminal, press ctrl+alt+t.

The command line is a key part of any truly modern computer operating system.

Here's the list of commands