[Automated test] standalone Selenium deployment full operation (PHP version)

Source: Internet
Author: User

I. Deployment Readiness

Platform Requirements:

Operating system: Windows, Linux can

Test Server environment: jre1.5 above, browser (recommended Firefox 3.5)

Testing the Client environment: PHP 5.X

Required Tools:

selenium-server-1.0.3 Download Address: http://selenium.googlecode.com/files/selenium-remote-control-1.0.3.zip

Autotest Download Address: (internal)
Virtual machines (no virtual machines can also be installed on this machine)
autotest Introduction:
Autotest is an automated test framework developed using PHP based on keyword-driven and data-driven. The framework design is flexible, adaptable to different testing tools (support but not limited to selenium), easy to expand and easy to customize keywords.

The use cases and data of the driver test are in Excel table format, which is convenient for the test students to write and view, and facilitate the extension.

Second, deployment steps

1. Server Deployment
Install the virtual machine on this machine (need to install jdk1.5 above version), start the virtual machine, copy selenium-server-1.0.3 to the virtual machine, unzip the local directory. Start Selenium-server, enter your unpacked directory as I unpack in C-Packing directory:

2011-12-31 13:57 upload download attachment (28.37 KB)

Then you can run the selenium seerver by the point of return.

When started, the Selenium-server service default listener port number is 4444, and if the port number is occupied, you can use the Java-jar selenium-server.jar-port nnnn to specify the port number.
For more detailed parameter use please refer to Java-jar selenium-server.jar-help.

Note that you need to set the network card option when the virtual machine starts:

2011-12-31 14:00 upload download attachment (19.13 KB)

Select NAT or the virtual machine will not be able to communicate with the client on the Internet.

2. Client Deployment
First from HG get autotest latest software package to local directory, no need to install. The same is extracted to the local directory, the client requested a prior installation of the php5.x version.

Setting environment variable: 1 setting environment variable: test_branch=testscripts

2 Set the PHP environment variable, according to the specific installation directory settings, and some PHP settings will be automatically added to the environment variables, if some do not need to add;

--------------------------------

Php_pear_bin_dir = C:\PHP

Php_pear_data_dir = C:\PHP\data

Php_pear_doc_dir = C:\php\docs

Php_pear_install_dir = C:\php\pear

Php_pear_php_bin =. \php.exe

Php_pear_sysconf_dir = C:\php

Php_pear_test_dir = C:\php\tests

When all of the above steps are complete, you can start the client for deployment testing:

2011-12-31 14:03 upload download attachment (14.67 KB)

Remember to add the test case set at the back, and the Tiaoshi on the diagram is one of my test case debugging collections.

At run time, you need to modify the testscripts_smokingtest_config.php and Testscripts_smokingtest_ below the directory Testsuite.php inside the related configuration of the server IP address, test case set, mail sender, etc., in the configuration file are described in Chinese. When you return to this interface, you will start communication with the server and run the scripts in the Tiaoshi collection.

Communication is successful, you can see the request response from the client on the server side, and the client will also believe the display of each step running. The entire stand-alone version of the selenium deployment is complete.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.