Search This Blog

Monday, April 25, 2016

Integration of Selenium with TestComplete

Integration of Selenium with TestComplete
Selenium is a free testing tool for web applications. Using the Selenium WebDriver API, you can create web tests in any programming language.
You can include your Selenium WebDriver tests into your TestComplete test project, run them as part of your automated testing process and analyze test results
Preparing TestComplete for Integration With Selenium Tests
»      Before you run your Selenium WebDriver tests in TestComplete, you need to prepare your test computer and TestComplete for Selenium integration. 
»      The CPI Cards Automation framework must be installed and configured on your computer and have Selenium WebDriver modules installed and configured.
»       To use Maven to run Selenium tests created by using TestNG, you must have Maven modules installed and configured on your computer.
»      The PATH environment variable on your computer must specify the path to Maven modules.
»      The JAVA_HOME environment variable must specify the path to your Java Developer Kit software location.
»      For more information on how to install and configure Maven, see the Maven documentation.
»      If your Selenium tests use a specific web browser driver, that driver modules must be installed and configured on your computer.

Steps to Integrate Selenium Tests created using TestNG to TestComplete
1.       Create a New Project suite with a valid name

2.       Create a new Project folder under the newly created Project suite with a valid name

3.       Right Click on Project folder and mouse over on Add menu item and select New Item

4.       In the Create Project Item window, select Selenium or Unit Testing as the Item type and provide a valid name

5.       Right click on newly created Item and mouse over on Add menu item and select Nes              s

6.       In the create Project Item window, select TESTNG as the Item type as the current CPI cards Selenium scripts are built using Java with TESTNG and provide a valid name

7.       Select the newly created Project Item(TESTNG) and a new tab is opened in the Workspace requesting for Maven Project and Classpath details

8.       Download latest Maven file from and click on mvn windows command file located in bin folder under maven x.x.x folder

9.       Since the Project is built on Maven, select the option Use Maven Project and provide the valid path of the project created say …\…\pom.xml

10.    Select the option Run all tests in the opened tab and save it

11.    Ensure Java is installed on the machine and configured in Environment variables with JAVA_HOME as Environment variable name

12.    Click on Tools menu and select Options menu Item

13.   On selection, Options window is opened. Select Engines folder and select Selenium Item which is located under it and provide the java.exe path

14.   Now right click on TESTNG Item located under Selenium unit Tests and select Run

15.    Now TestComplete engine compiles, builds and starts executing the Maven project

16.    Once on execution  find the execution results in results folder located under Selenium Framework as TestComplete only provides details about maven build success