Posts

Showing posts from December, 2011

Selenium 2.0 / Web Driver and Eclipse

Image
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 : http://seleniumhq.org/download/ The latest version right now is : "selenium-java-2.15.0.zip" Unzip the files into the project that you just created Back in Eclipse, right click on your project in the Package Explorer and choose Build Path , Configure Build Path... . Choose the Libraries tab Click Add Jars Select all of the jars that you just unzipped into the /lib/selenium-jars/ folder and click OK Choose 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 htt tp://selenium.googlecode.com/svn/trunk/docs/api/java/ ) Click Ok and u are ready. Right click on t

Install m2eclipse for Indigo

Image
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 : http://download.eclipse.org/technology/m2e/releases Click Add… Give a name for the repository (such as m2eclipse ) Click OK Select the checkbox Maven Integration for Eclipse Click Next etc. to move forward and choose to restart Eclipse when prompted

Lets Install Maven

Image
Steps to Install Maven  for Windows XP: Maven is a Java tool, so you must have Java installed. Download Maven from http://maven.apache.org/download.html#Installation Unzip the distribution archive, i.e. apache-maven-3.0.3-bin.zip to the directory you wish to install Maven 3.0.3 Add 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.3 Add the M2 environment variable in the user variables with the value %M2_HOME%\bin Update/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_02 Restart the machine Open a new command prompt and type mvn --version to verify that it is correctly installed Source: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.h

Integrate Quality Center with Fitnesse

Image
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 things Report a Pass/Fail for the test Upload 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

VBscript to close any popup message box

Image
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") Do       ret = wshShell.AppActivate("System Settings Change")       If ret = True Then           wshShell.SendKeys "%N"           Exit Do       End If       WScript.Sleep 500   Loop