Tuesday, July 31, 2012

Selenium Test Automation for GWT Websites


Hi,

GWT is one of the latest technologies used to develop nice web sites and applications. When it comes to test automation for GWT based web sites / systems we need to know what we can do and what we cannot do. Therefore I thought of sharing this post with what I could found recently and I will keep updating this post with my latest findings. Visitors are welcome to share their experience related to Selenium with GWT under this post.


Following are couple of good articles I came across and looks interesting.

When dealing with different types of elements we may need to use xpath to access some elements in GWT. In that case it is good to have an idea about xpaths and how we can find the xpath and how we can use them  with Selenium.

Following links provide some useful information related to xpath and how we can use in Selenium.



Further I came across following plugins which would be very useful when recording scripts via Selenium IDE

Selenium useful Plugins:
  • Selenium Expert
  • Highlight Elements
  • Implicit Wait

Wednesday, July 25, 2012

How to Generate an Index of Excel Sheets Dynamically



This post is about "How to Generate an Index of Excel Sheets Dynamically" which is very helpful when you are dealing with Large excel files with lots of sheets/tabs.

Step 1. Create a New Sheet called "Index"
Step 2. Right click on the sheet and go to View Code ( It will open VB Editor )
Step 3. Copy the following VB Script there


 Private Sub Worksheet_Activate()
 Dim wSheet As Worksheet
 Dim l As Long
 l = 1
   With Me
     .Columns(1).ClearContents
     .Cells(1, 1) = "INDEX"
     .Cells(1, 1).Name = "Index"
   End With
   For Each wSheet In Worksheets
     If wSheet.Name <> Me.Name Then
       l = l + 1
         With wSheet
           .Range("A1").Name = "Start_" & wSheet.Index
           .Hyperlinks.Add Anchor:=.Range("C1"), Address:="", _
           SubAddress:="Index", TextToDisplay:="Back to Index"
         End With
         Me.Hyperlinks.Add Anchor:=Me.Cells(l, 1), Address:="", _
         SubAddress:="Start_" & wSheet.Index, TextToDisplay:=wSheet.Name
     End If
   Next wSheet
 End Sub


Step 4. Now save and close the VB Editor
Step 5. Go to a different sheet and come back to Index Sheet
Step 6. Now you can see that the Index has been generated along with the list of sheets with links
Step 7. when you go to a sheet you can see another link to go back to index sheet as well.

Thursday, July 19, 2012

How to Format Code Blocks in your Blog



I thought it would be interesting to know how we can publish code blocks with proper formatting which is convenient for the reader to read or copy.

I found couple of interesting articles which can be used to do this task. I thought of sharing this links rather than explaining the same thing by my self.







Wednesday, July 18, 2012

Test Automation - integrating to Jenkins

Test Automation - integrating to Jenkins/Hudson


Currently test driven development is the latest trend in the software industry due to the Agile Process. Hence it is really important to utilize test automation tools in the QA process to automate possible test cases. This allows to save time and utilize the resources very well. In this post I would like to discus about how we can integrate test automation scripts to Jenkins (Continuous Integration Tool / Build Tool) and generate test results.

There are lot of approaches to do this task and it depends on the tools that is used by your company for test Automation.

Here are few suggestions I can given and you may further refer following links to integrate you test scripts to Jenkins/Hudson

Marathon vs Jenkins

  • If your using Marathon as the test automation tool then you can create a simple build.xml with the test scripts. Test Scripts can be groups in to several ant targets. 
  • You can create a Jenkins job and setup the build.xml and invoke the relevant ant target.
  • Further you need to mention the marathon home path in the build xml and the project paths of the test automation projects.
  • Further you can setup "Publish JUnit test result report" with the JUnit report generation path of your test automation project
  • Then you may execute these Jenkins jobs as you wish
  • This will execute your test scripts using Marathon, and generate JUnit test reports and it will display under test results of the Jenkins Job.
TestLink vs Jenkins

Further you can integrate Testlink with Jenkins and you may refer following article for more details.