Ways to Test Your Web Applications

submit to reddit

Lets discuss here about some of the ways that can be used to test a web application. First, we need to know what components/functions are mandatory for testing.

Types of testing in a Web application :

1] Navigation Testing.

2] Browser compatibility Testing.

3] Usability Testing.

Navigation Test is very important in web application, which we all know how to do. For Browser Test, all we need to do is to install all browsers, make our desktop loaded with bunch of Browser icons and test our application. Check below the List of Browsers people use these days.

Chrome 17-23, Firefox 10-17, Internet Explorer 10, Opera 12, Safari 6 – Almost 80% of Web Users use these Browsers.

For Full List of Web browsers, GO HERE.

Xampp from Apache Friends will get you the best environment locally to test. XAMPP has Apache, MySQL, PHP + PEAR, Perl, mod_php, mod_perl, mod_ssl, OpenSSL, phpMyAdmin, Webalizer, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, Ming, FileZilla FTP Server, mcrypt, eAccelerator, SQLite, and lot more than you need to run your website.

Today, I want to highlight a browser automation framework, that will make Designer’s Life easier. There are many advantages of test automation. It gives long term efficient way to test particular software processes.

The product i am talking here is none other than Selenium Automation Framework.

 

Some of the Advantages of Selenium are ::

  • Frequent Testing of similar scenarios.
  • Much faster way to test robustness of system.
  • Helpful for developers.
  • Supports all the development methodologies, like Agile.
  • N numbers of iterations are available
  • Systematic way to document, run and log the defect for testers in minimal testing.

 

Lets see how to install Selenium Framework ?

1)      Download the driver Client and install  the JARs of selenium.

Link to Download

Are you a Eclipse Guys ? Then we have a good news for you. We can get eclipse plugin too.

2)      Install Firefox firebug plug in to get xpath.

http://www.wikihow.com/Find-XPath-Using-Firebug

3)     Find the sample Java Class.

 

Sample Java Class ::

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import java.io.IOException;

import java.util.concurrent.TimeUnit;

import com.openqa.selenium.*;

import com.seleniumBase;

public class helloWorld extends seleniumBase {
public void initialize(String ButtonName) throws Exception {

WebDriver driver = null;

// Choose Our Appropriate Browser
switch (browser) {
case "chrome":
driver = new ChromeDriver();
case "firefox":
driver = new FirefoxDriver();
case "InternetExplorer":
driver = new InternetExplorerDriver();
}

// Get Our Application URL
driver.get("http://rockstartemplate.com?q=test");

// Set Our Application Elements to Whatever name we Want
WebElement query = driver.findElement(By.name("ButtonID")); // Option 1
WebElement query = driver.findElements(By.xpath("//td[@class='gssb_a gbqfsf']")); // Option 2 - Get XPATH from FIREBUG

//Set the Values
query.sendKeys(ButtonName);
}
}

 

We are all set to Test now. Please comment with your comment / concerns and suggestions. Happie Testing !!