Monday, July 13, 2009

Automation with Selenium CORE

Selenium Core configuration with Web Application :-

Pre-requisite:-

You should have configured your application server(Tomcat, Weblogic, Jboss) to run web application. It means your web application build should be configured with Web Application server, put the application build in Tomcat -Webapps folder .

Configure Selenium Core:

Following steps are required to configure Selenium core on your server machine:-

1. Download Selenium Core from selenium-core-1.0-beta-2.zip from http://seleniumhq.org/download .

& Extract the downloaded Zip folder.

2. Now create a folder named “Selenium”(can be change name as ur flexibility) in the directory - webapps directory of tomcat installation.

3. Extract the content of the – CORE folder which is from downloaded zip file into Selenium folder.

4. Start Tomcat Server

5. Locate url http://:8080/Selenium/core/TestRunner.html in your browser. The host IP address will be replaced by the IP Address of the server you are using.

6. This will open selenium Test Runner page.

So this way you can access the files those are relate with through the TestRunner.html file.

Integrate Test Suites:

Following steps are required to integrate the test suite:-

1. Create a folder for your test suite e.g. TestSuite1 folder in Selenium\tests\ directory.

2. Copy all test cases in TestSuite1 folder

3. Create Folder "ProjName" which is present under the \Selenium\tests directory. (If not present then create folder as project name)

4. Put all test suite files in ProjName folder

5. Ensure proper relative path for all test cases in your test suit file.

6. Open TestPrompt.html file present which is in \Selenium\core directory.

7. Add entry for the new test suite file in the test suites list see in ProjName folder

8. See all test suites in the dropdown list format by using the Test Runner.html page on browser.


Few Important Notes :-

1)Ensure proper naming convention for files - test suites and test cases files should be with .html extension and should not have empty space in the name

2) ProjName folder will contain all the test suites html files. Test cases related to this test suites will be put in a different folder (as mentioed above step 1)

3) Remove server name for the open command in all the selenium test cases. This is not required as Selenium core take local server as default server of execution. E.g. use “/MedspacePortal/” instead of “http://phi001web:8080/MedspacePortal/

4) You can modify TestPrompt.html as per your requirements.

--Thanks,

- Gaurav

No comments: