selenese mode of SRC

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

selenese mode of SRC

Thomas C. Knoeller
| Note that you can also use this trick to run your HTML tests against
| websites without installing Selenium on the website itself.
|
| http://www.openqa.org/selenium-rc/selenese.html

Ok, I am trying this out and I have a few questions.

1. Is there a way to tell TestRunner to use slow mode (ie walk) when running
the commands with "?auto=true" set in the url?  If yes, will it work with SRC
in selenese mode?

2. How can I convince the SRC proxy to run testrunner when my device under
test is reached over ssl?  

Using more words, my DUT is reached via https://server but the proxy does not
seem to think that https://server/selenium-server/TestRunner.html should run
the the proxied TestRunner.html.  Instead it passes the url on to my DUT.  The
browswer uses the proxy (confirmed by running tcpdump on the localhost) but
then passes the url to the DUT (confirmed by looking at DUT webserver logs.)

I can get around this by using stunnel to bypass the ssl connection
(localhost:8080 -> server:443), but then I run into my next question.

3. Can I use a user-extensions.js file using SRC in selenese mode?  If so,
how?

Thanks,
-Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: selenese mode of SRC

Dan Fabulich
Thomas C. Knoeller wrote:

> 1. Is there a way to tell TestRunner to use slow mode (ie walk) when running
> the commands with "?auto=true" set in the url?  If yes, will it work with SRC
> in selenese mode?

I believe you can set "?auto=true&runInterval=500" to get an effect very
similar to "walk" mode.

> 2. How can I convince the SRC proxy to run testrunner when my device under
> test is reached over ssl?

Unfortunately, you've hit one of our fatal weaknesses: our proxy has no
SSL support.  This is SRC-3.

http://jira.openqa.org/browse/SRC-3

> 3. Can I use a user-extensions.js file using SRC in selenese mode?  If so,
> how?

Put your user-extenions.js file in the same directory as your HTML suite
file.

-Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: selenese mode of SRC

Thomas C. Knoeller
Dan,

Thank you for the answers.  I have some followup questions now.

| Unfortunately, you've hit one of our fatal weaknesses: our proxy has no
| SSL support.  This is SRC-3.

I am trying to get around this by using stunnel.  I setup stunnel to forward
port localhost:8080 to server:443.  This works for me if I go thru the stunnel
using TestRunner mode.  It also *seems* to want to work in SRC/selenese mode.
By *seems*, I mean that without my users-extensions.js file in place, it will
run thru the tests and I see my initial screen for each test before it fails
on a user extenstion command.  

The user extension command I am having problems with is the flowcontrol
extension found here (http://wiki.openqa.org/display/SEL/flowControl).
The specific portion of that module that I am having problems with is the
startTest() function.  I am assuming it is redefining the function so it can
initialise some things the flow stuff needs.

When I run my tests with the user-extension file with the flowcontrol in it,
the whole test will just stop.  It completely hangs after the RC server puts
out the the line "INFO: Checking Resource aliases".  I end up having to kill
the browser to end the test run.

My goal is to be able to write and run tests in TestRunner mode which can then
be directly used in SRC/Selenese mode.  So having the flowcontrol extensions
is important to me.  

Can you help me understand what the problem might be?

My second question might be related to my user extensions, also.  I have
found that in TestRunner mode, the first line in my test is ignored.  In
SRC/Selenese mode, That line is parsed.  I am getting around this difference
right now by making the first line into a store command.
("store | something | here").  

This is a little annoying but not a show stopper.  What would cause this?

Thanks,
-Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: selenese mode of SRC

GW-5
Hi,

I am currently experimenting with flowcontrol, too. Until now it does not work as expected. Maybe together we can find the problem?


> The specific portion of that module that I am having
> problems with is the
> startTest() function.  I am assuming it is redefining
> the function so it can
> initialise some things the flow stuff needs.

yes, it overrides the old function.
for better compatibility it should rename the old one, than call it and add the own changes to the new function.
(I forgot how to do this - I am no JS expert, and currently this would not fix my problem)


My problem is that the startTest() function does not get called in IDE mode.
So the labels are not initialized.
you might init the labels on the first LABEL command, but where to get the full list of commands? The code in initialiseGotoLabels() seems to be dedicated to the ehm, mode where you have multiple frames (this is the testrunner mode?)


> My second question might be related to my user
> extensions, also.  I have
> found that in TestRunner mode, the first line in my
> test is ignored.  

I am not exactly sure what you are talking about, but I realized there may be a bug in flowcontrol: it skipped the first line and started with i=1.
(or is the first line the table header?)


function initialiseGotoLabels() {
    var labels = new Array();
    for (var i = 0; i <= inputTableRows.length - 1; i++) {
^^^^^^^^^^^^^^^^^^^^
        if (getText(inputTableRows[ i ].cells[0]) == 'label') {
            log.warn('label: '+i.toString());
            log.warn(getText(inputTableRows[ i ].cells[1]));
            labels[getText(inputTableRows[ i ].cells[1])] = i;
        }
    }
    return labels;
}


JPT
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1559&messageID=5372#5372

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: selenese mode of SRC

Thomas C. Knoeller
| I am currently experimenting with flowcontrol, too. Until now it does not
| work as expected. Maybe together we can find the problem?

I dunno if I will be if much help anymore.  Trying to get user-extensions to
work in the various selenium modes (TestRunner, IDE, and Selenese mode of RC)
all seemed to have unique challenges.  So, I have moved on to using python to
drive selenium rc.  So far, I have not run into any roadblocks that I cannot
work around using the symatics of the scripting language I am most comfortable
with.

| > My second question might be related to my user
| > extensions, also.  I have
| > found that in TestRunner mode, the first line in my
| > test is ignored.  
|
| I am not exactly sure what you are talking about, but I realized there may
| be a bug in flowcontrol: it skipped the first line and started with i=1.
| (or is the first line the table header?)

No, it was not a table header, iirc.  It was supposed to be an actual command.
It could have been something was fixed between the v0.6 selenium core I was
testing against and the pre-release v0.7(?) selenium core that is in RC.  But
again, I am not using selenese mode anymore, so I don't know if I remember
exactly what the problem was.

-Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: selenese mode of SRC

GW-5
I am somewhat confused as to how to use Stunnel as a proxy for the SSL portions of testing.  I am running it on a Windows XP professional machine, and right now, I have the configuration file set such that under the https header, it is set up like so:

[https]
;accept  = localhost:8080
;connect = https://testenv.app_under_test.net:443/
;TIMEOUTclose = 500

but this does not seem to work.  Can anyone explain a little more explicitly how to set up STunnel to proxy the https requests to work with the Selenium RC server?  Thanks.

[hidden email]
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1559&messageID=5545#5545

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]