How to automatically record test results in Selenium

Source: Internet
Author: User
Although the selenium website says that you can use the auto = true parameter to automatically execute the script and record the test results, it won't work after many attempts. I finally figured out what the postreuslts in selenium was like today. The original article is as follows:

Selenium can't actually write to a file directly. In "Auto" mode,
Selenium will post results to a URL, where it expects to find a "results
Handler ". The default URL is"/postresults ". So, you need to implement
A "Results handler" (typically a CGI-script, Java Servlet, or similar ),
And arrange for it to be "mounted" at "http: // yourserver/postresults"
(See the selenium manual for details of what data gets posted). Your
Handler can record the result data however you wish; writing to a file
Is fairly standard.

You can specifiy an alternative handler location by providing
"Resultsurl" parameter-But beware that, unless you're using HTA, it
Needs to be on the same server as selenium, as posting of results is
Subject to the same cross-site scripting restrictions as the rest
Selenium.

Source: http://forums.openqa.org/thread.jspa? Threadid = 554 & tstart = 150

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.