Wednesday, 30 November 2011

Where to download jUnit and how to install?

Aim:Where to download jUnit and how to install?

Key Steps:
  1. For download the Junit jar use URL: https://github.com/KentBeck/junit/downloads
  2. Open the Eclipse IDE.
  3. Create JAVA project directory.
  4. Select the Project and right click
  5. Click 'Properties' option.
  6. Select 'Java build path' and click 'Add External Jar' button.
  7. Select the downloaded Jar file.
  8. Click 'OK' button.
  9. Successfully added the jar file with the created Project.
Helpful Video:

Where to download testNG and how to install?

Aim:Where to download testNG and how to install?

Key Steps:
  1. For download the Selenium Standalone server use URL:http://testng.org/doc/download.html
  2. Extract the downloaded zip file.
  3. Open the Eclipse IDE.
  4. Create JAVA project directory.
  5. Select the Project and right click.
  6. Click 'Properties' option.
  7. Select 'Java build path' and click 'Add External Jar' button.
  8. Select the downloaded Jar file.
  9. Click 'OK' button.
  10. Successfully added the jar file with the created Project.
Helpful Video:

Where to download Selenium Server standalone jar from?

Aim:Where to download Selenium Server standalone jar from?

Key Steps:
  1. For download the Selenium Standalone server use URL:http://code.google.com/p/selenium/downloads/list
  2. Open the Eclipse IDE.
  3. Create JAVA project directory.
  4. Select the Project and right click.
  5. Click 'Properties' option.
  6. Select 'Java build path' and click 'Add External Jar' button.
  7. Select the downloaded Jar file.
  8. Click 'OK' button.
  9. Successfully added the jar file with the created Project.
Helpful Video:

How to check that JDK is installed and working?

Aim:How to check that JDK is installed and working?

Key Steps:
  1. Download the JDK from URL: http://www.oracle.com/technetwork/java/javase/downloads/index.html
  2. Installed the downloaded JDK installer.
  3. Set the path of bin directory of JDK into System variable.
  4. Set the JAVA_HOME variable of JDK folder into System variable.
  5. For check the working of JDK,open the command prompt.
  6. Execute the command 'java -version'.
  7. In message version is displayed of JDK.

Helpful Video:

How to check that Ant is installed and working?

Aim: How to check that Ant is installed and working?

Key Steps:
  1. Download the Ant tool from URL: http://ant.apache.org/
  2. Put the downloaded zip file into anywhere in the System.
  3. Extract the downloaded zip file.
  4. Set the path of bin directory of Ant tool into System variable.
  5. For check the working of Ant tool,open the command prompt.
  6. Execute the command 'ant -version'
  7. In message version is displayed of Ant .

Helpful Video:

Thursday, 24 November 2011

Example - Selenium Grid2

Aim - To demonstrate how to run multiple tests on multiple browsers (IE and FF) in parallel using Selenium Grid2. The Selenium scripts which are written in java will open up Google.com and Search for the keywords.

Difficulty Level: HIGH

Pre-requisites:

  • JDK (JAVA version "1.6.021") should be installed and working
  • Ant (Apache Ant version 1.7.1) should be working
  • selenium-server-standalone-2.12.0.jar
  • testng-5.14.1.jar

Wednesday, 9 November 2011

Example : Working with dbunit using junit

Aim:
To demonstrate DBunit with Junit by inserting a record in the database then using dbunit to assert for the uploaded records in a database/ table.

Difficulty Level: High

Pre-Requisites:
  • Eclipse IDE installed
  • MY SQL Server should be installed and working
  • dbunit, junit, java mysql connector jar files available
Steps involved in implementation:
  • Create a database / table using My sql database server
  • Connect with created database's table using java My SQL connection code
  • In the connected table upload records through XML file using DBunit methods
  • The XML shows the number of records we have uploaded into the table
  • With the help of dbunit methods we assert for the uploaded records in table