History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SRC-517
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Daiji
Votes: 3
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

Add support for running Selenium HTML IDE files as tests that hit the Selenium RC server

Created: 24/Aug/08 10:59 PM   Updated: 20/Oct/08 10:49 AM
Component/s: Client Driver - Java
Affects Version/s: 1.0 beta 1
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. File build.sh (0.1 kb)
2. File selenium-java.sh (0.2 kb)
3. File selenium_html_driver.user.js (8 kb)
4. File selenium_html_driver.user.js (5 kb)
5. Java Source File SeleniumHtmlClient.java (18 kb)
6. Java Source File SeleniumHtmlClient.java (15 kb)



 Description  « Hide
This is only filed against the Java Client Driver because I'm attaching code that enables aspects of the requested feature reusing classes in that driver.
If it's more appropriate to assign a new/different component/project (or split the bug, etc.) go ahead and do so.

The request for Selenium RC/Grid is to support the running of tests created using Selenium IDE in an automated fashion against a Selenium RC without requiring the test developer to export the files into Java/Ruby/PHP/etc. This cannot be done in 1.0beta1, as it's still required that it runs on the same box.

This feature enables a round-trip test development cycle between the Selenium IDE and continuous integration automation, and separates the test code from the references to the server URL, as the base URL can now be specified outside of the test. This empowers non-programming QA staff to write/modify/use Selenium automation with little extra effort.

This issue is associated with the forum thread "Contribution: running Selenium IDE HTML over RC (via GreaseMonkey)" at http://clearspace.openqa.org/thread/15240?tstart=0 and is being filed into JIRA upon request.

I've rewritten what I originally wrote in GreaseMonkey JS as a fairly-complete Java-based driver that compares to (but does not quite match) the standard driver. It successfully runs the Selenium Core test suite, altho it should be noted that the echo command does not work properly.


 All   Comments   Work Log   Change History      Sort Order:
Daiji - 24/Aug/08 11:08 PM
This isn't structured properly (several classes in a single file, no proper property encapsulation, no Javadoc, no unit tests) but was written this way to simplify the dev environment requirements and followed on my thinking to producing a fully-functional version that people can actually use right away. I've also attached the scripts I used to build and run. Here is the command I used to run the full test suite against Opera:

./selenium-java.sh --browser "*opera" --testsuite ../../selenium-core-0.8.3/tests/TestSuite.html --baseurl http://mymachine/selenium-core/tests/ --out results.html

The NekoHTML parser is required in order to properly parse HTML4 syntax (used by the bulk of the Selenium Core testsuite), but on the other hand, the standard XML parser is required to properly parse XHTML syntax (produced by the Selenium IDE).

I also added support for a number of functions that exist in Core but not in the IDE.

Daiji - 24/Aug/08 11:10 PM
Here is an attachment of my original GreaseMonkey prototype, which isn't anywhere nearly as functional as the Java version.

Daiji - 24/Aug/08 11:12 PM
I should have also noted that the Java client driver version needs to be modified to parse the file before executing, rather than executing as it parses the file as it does now.

There are probably other problems with it too, but it should provide a decent start.

Daiji - 24/Aug/08 11:20 PM
In terms of my thinking on where this could go from here:

- The GreaseMonkey script could probably get modified and incorporated into the Selenium IDE as a way to run/debug on a Selenium RC/Grid setup.

- The Java code could probably get improved upon and made part of the Java driver as a means to run Selenium IDE HTML via Selenium RC/Grid

Daiji - 26/Aug/08 11:24 PM
I found a number of bugs in the code I attached here. that fail to process verify errors properly and/or to trim the HTML the same way that the IDE and Selenium Core apparently do. I'll post again when I have a fixed version of each.

Daiji - 28/Aug/08 06:37 AM
Ok, here's an update. Not all tests pass now, but I'm ok with the reasons for the failures, as some don't pass in Selenium IDE anyway, and in general they're things that won't pass via selenium RC/Grid

Changes:
* Fixed numerous issues in how the tests were run
* Added coloring of results
* (Java) Fixed how results were checked
* (GM Javascript) Added support for some of the verifySelected verify types and for the store command that exist in the core but not in the remote driver protocol.
* (GM Javascript) Added support for running tests that don't have base URL in them
* (GM Javascript) Added support for specifying host, port, browser, baseurl and verbose via query parameters, which should reduce the need to modify the script.

Not done:
* (GM Javascript) reuse code from existing JS codebase
* (GM Javascript) add support for running test suites
* (GM Javascript) investigate incorporating into selenium IDE
* (Java) provide support for output being specified via XSL templates.

Carlos Sanchez - 30/Sep/08 06:18 PM
I'm also interested, I'd like to run the html tests along with the java tests and display aggregated results in the form of junit test reports

Daiji, could you upload the files with a license header to clarify that your work is open source before I make any modifications?

Marcelo Vaccaro - 16/Oct/08 11:59 AM
I'm also interested in running html tests on Selenium Grid.
i'm new to Selenium RC and grid...what should we do with the files included above?

Thanks,

Marcelo

Rich Molumby - 20/Oct/08 10:49 AM
I'm also interested in running html tests on Selenium Grid.
I work with a non-technical QA Team, so java tests are not an option.
I'm new to Selenium RC and grid...what should we do with the files included above?

Thanks,

Rich