Delivered by FeedBurner

System Configuration Steps To Generate webdriver test execution report using JUnit : Part -1

Many people facing issues in JUnit report generation configuration using ant and eclipse. If every thing is not setup properly then it will give you one or another error and you will be not able to generate JUnit software test case execution report for your webdriver test case. Let me describe you few system configuration steps in this post and eclipse configuration steps in my next post to generate JUnit test execution report very easily and without any error.

Step 1 : Download and install latest Java SE
Download and install latest Java SE software Development Kit (Java development Kit(JDK) and Java Runtime Environment(JRL)) as per your system configuration. Look at THIS POST to know how to download and install java software.

Step 2 : Download Latest Version of apache-ant zip
Download latest version of apache-ant from Current latest version is apache-ant-1.9.2 as shown in bellow image and it may be different in future.

Extract zip file and save it in your local drive.

Step 3 : Steps to Set Environment variables in system property for java

- Set JAVA_HOME Environment variable
You need to set JAVA_HOME Environment variable in your system property. To set Environment variable, Right click on My Computer -> Properties and go to -> Advanced tab. Clicking on Environment variables button will open Environment variable dialog. Click on New button from System Variables box and add Variable Name = JAVA_HOME and Variable Value = Path of your jdk folder. Here my JDK folder path is 'C:\Program Files\Java\jdk1.7.0_40' as shown in bellow image.

- Set ANT_HOME Environment variable
Same as JAVA_HOME Environment variable, Add new system variable nameANT_HOME and Variable Value = Path of your apache-ant-1.9.2 folder as described in bellow image.

- Edit Path Variable
After setting JAVA_HOME and ANT_HOME system variable, Edit existing Path variable by selecting Path variable from System variables list and click Edit button and insert  %JAVA_HOME%\bin;%ANT_HOME%\bin  at the end of Path variable value string. Do not forget to put semicolon (;) before %JAVA_HOME%\bin as shown in bellow image.

- Copy tools.jar from jdk/lib and paste It In jre/lib
  • There will be 2 folders In your C:Program Files\Java folder. 
  • In my system It Is jdk1.7.0_40 and jre7.
  • Open C:\Program Files\Java\jdk1.7.0_40\lib folder and copy tools.jar file.
  • Open C:\Program Files\Java\jre7\lib and paste tools.jar In to It. 
Now restart your system to getting system variables changes effect.

Verify ant configured properly or not
To verify that ant Is configured properly or not, follow the bellow given steps after restarting system
  • Open command prompt.
  • Type command "ant" and press Enter button.
  • It should show you message as bellow.

Buildfile: build.xml does not exist!
Build failed

If you will see above message In command prompt that means you have successfully Installed ant software.

Now system configuration is completed for generating webdriver software test execution report using JUnit. Now you need to configure eclipse as described in my Next post.

1 comment:

  1. Hi,

    Could you please help me out, whether we can add another column to the report which contains link to failure test case screen shot.?

    This feature would be very much useful.