Showing posts from December, 2011

Selenium 2.0 / Web Driver and Eclipse

Steps to set up web driver and Eclipse:
Open Eclipse from the menu choose File, New, Project...In the folder Java, choose Java Project. Give project a name, accept the rest of the defaults, and click Next.Download the latest zip file for selenium frm : latest version right now is : ""Unzip the files into the project that you just createdBack in Eclipse, right click on your project in the Package Explorer and choose Build Path, Configure Build Path.... Choose the Libraries tabClick Add JarsSelect all of the jars that you just unzipped into the /lib/selenium-jars/ folder and click OKChoose the primary selenium jar, which in this example is selenium-java-2.15.jar , expand and  double-click on Javadoc location. (Enter the location for the Selenium JavaDocs into the Javadoc location path field htttp:// Ok and u are ready.Right click on the /src folder in your project an…

Install m2eclipse for Indigo

Eclipse does not have integrated Maven support out of the box. To add the support, I am going to use Maven Integration (m2e).
In Eclipse: Help -> Install New Software…Type the following URL in field Work with: Add…Give a name for the repository (such as m2eclipse)Click OKSelect the checkbox Maven Integration for EclipseClick Next etc. to move forward and choose to restart Eclipse when prompted

Lets Install Maven

Steps to Install Maven for Windows XP:
Maven is a Java tool, so you must have Java installed.Download Maven from the distribution archive, i.e. to the directory you wish to install Maven 3.0.3Add the M2_HOME environment variable with the value of where you have extracted the zip artchive: C:\Program Files\Apache Software Foundation\apache-maven-3.0.3Add the M2 environment variable in the user variables with the value %M2_HOME%\binUpdate/create the Path environment variable and append the value %M2% to add Maven available in the command line.Make sure that JAVA_HOME exists in your user variables or in the system variables and it is set to the location of your JDK, e.g. C:\Program Files\Java\jdk1.5.0_02Restart the machineOpen a new command prompt and type mvn --version to verify that it is correctly installedSource:

Happy Testing!!!

Integrate Quality Center with Fitnesse

I had a hard time trying to figure this out , so here are the steps for the basic integration of these two tools :
The same logic can be used to integrate Quality center and any open source tool:

Set up a VAPI-XP-TEST in quality center that will store the script and the logic to run the same.The script would then invoke the opensource tool , in our case Fitnesse from test lab in QC.Once the test is complete we would do two thingsReport a Pass/Fail for the testUpload the results that are generated by the Fitnesse tool into QC Here is the cod e that you need to place in the QC VAPI-XP-TEST:

' FitNesse.SuiteAcceptanceTests.SuiteWidgetTests.SetUpLinkTest [VBScript]
' Created by Quality Center
' ====================================================

' ----------------------------------------------------
' Main Test Function
' Debug - Boolean. Equals to false if running in [Test Mode] : reporting to Quality Center
' CurrentTestSet - [OTA COM Library].TestSet.

VBscript to close any popup message box

A strange thing happened when i was trying to run QTP tests from Quality Center , there was this error message popped up after every test run.
Until the message box was not closed manually QC would wait indefinitely, defeating the whole purpose of automation.

So here is the vbcript that would run indefinitely waiting for the popup; and close it for tests to continue:

Set wshShell = CreateObject("WScript.Shell")
      ret = wshShell.AppActivate("System Settings Change")
      If ret = True Then
          wshShell.SendKeys "%N"
          Exit Do
      End If
      WScript.Sleep 500