We are attempting to build some tools so we can track metrics (when our users' experience might be getting too slow and we need to add resources.) So we want to be able to script logging in to RoundCube and viewing an inbox (and measure the time it takes.)
I figured we could use wget with --save-cookies and --keep-session-cookies to load the login page and get a cookie, then wget again with --load-cookies and --post-data to feed in all the form fields, including username and password, but now I've gotten myself very confused about the _token field in the form, and the roundcube_sessid string in the cookie (and the s=##### javascript stuff. . .) and haven't been able to get it working by flailing.
Has anyone experience with this?
Or is there documentation somewhere I could grok the whole login / session process?
Or is this just not going to be possible without running some javascript?
Thanks in advance,
Benjamin
Isn't it a better idea to measure the actual user experience? Measure page generation times with PHP and measure load and parse times with Javascript?
On Thu, Sep 6, 2012 at 11:00 PM, Benjamin Connelly ben@electricembers.netwrote:
We are attempting to build some tools so we can track metrics (when our users' experience might be getting too slow and we need to add resources.) So we want to be able to script logging in to RoundCube and viewing an inbox (and measure the time it takes.)
I figured we could use wget with --save-cookies and --keep-session-cookies to load the login page and get a cookie, then wget again with --load-cookies and --post-data to feed in all the form fields, including username and password, but now I've gotten myself very confused about the _token field in the form, and the roundcube_sessid string in the cookie (and the s=##### javascript stuff. . .) and haven't been able to get it working by flailing.
Has anyone experience with this?
Or is there documentation somewhere I could grok the whole login / session process?
Or is this just not going to be possible without running some javascript?
Thanks in advance,
Benjamin _______________________________________________ Roundcube Development discussion mailing list dev@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/dev
Hey,
what about setting up Selenium and a front end test. If you don't know Selenium: This is a Firefox plugin and I used it a while ago to script a login process, test something and logout. You can record mouse clicks, key inputs and set up conditions and co and test a page for elements or text or whatever. I guess loading times are also possible to measure. You can set a loop to repeat this test 1000 times… so you may get a good performance indicator and see, what your users will see…
Just my thoughts. Florian
Am Freitag, den 07.09.2012, 09:08 +0200 schrieb Peter Overtoom:
Isn't it a better idea to measure the actual user experience? Measure page generation times with PHP and measure load and parse times with Javascript?
On Thu, Sep 6, 2012 at 11:00 PM, Benjamin Connelly ben@electricembers.net wrote:
We are attempting to build some tools so we can track metrics (when our users' experience might be getting too slow and we need to add resources.) So we want to be able to script logging in to RoundCube and viewing an inbox (and measure the time it takes.) I figured we could use wget with --save-cookies and --keep-session-cookies to load the login page and get a cookie, then wget again with --load-cookies and --post-data to feed in all the form fields, including username and password, but now I've gotten myself very confused about the _token field in the form, and the roundcube_sessid string in the cookie (and the s=##### javascript stuff. . .) and haven't been able to get it working by flailing. Has anyone experience with this? Or is there documentation somewhere I could grok the whole login / session process? Or is this just not going to be possible without running some javascript? Thanks in advance, Benjamin _______________________________________________ Roundcube Development discussion mailing list dev@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/dev
Roundcube Development discussion mailing list dev@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/dev
Hey there,
Beside Selenium, you can try PhantomJS fo testing purpose.
Please refer to http://code.google.com/p/phantomjs/wiki/WhoUsesPhantomJS [4] to get inspiration from projects that used it.
Regards,
Sabda
On 2012-09-07 15:21, Florian Mycka wrote:
Hey,
what about setting
up Selenium and a front end test. If you don't know Selenium: This is a Firefox plugin and I used it a while ago to script a login process, test something and logout. You can record mouse clicks, key inputs and set up conditions and co and test a page for elements or text or whatever. I guess loading times are also possible to measure. You can set a loop to repeat this test 1000 times… so you may get a good performance indicator and see, what your users will see…
Just my thoughts. Florian
Am Freitag, den 07.09.2012, 09:08 +0200 schrieb Peter Overtoom:
Isn't it a better idea to measure the actual user experience? Measure page generation times with PHP and measure load and parse times with Javascript?
On Thu, Sep 6, 2012 at 11:00 PM, Benjamin Connelly
<ben@electricembers.net [3]> wrote:
We are attempting to build
some tools so we can track metrics (when our users' experience might be getting too slow and we need to add resources.) So we want to be able to script logging in to RoundCube and viewing an inbox (and measure the time it takes.)
I figured we could use wget with --save-cookies
and --keep-session-cookies to load the login page and get a cookie, then wget again with --load-cookies and --post-data to feed in all the form fields, including username and password, but now I've gotten myself very confused about the _token field in the form, and the roundcube_sessid string in the cookie (and the s=##### javascript stuff. . .) and haven't been able to get it working by flailing.
Has anyone experience
with this?
Or is there documentation somewhere I could grok the
whole login / session process?
Or is this just not going to be
possible without running some javascript?
Thanks in
advance,
Benjamin
Roundcube
Development discussion mailing list
dev@lists.roundcube.net [1]
http://lists.roundcube.net/mailman/listinfo/dev [2]
Roundcube Development
discussion mailing list
dev@lists.roundcube.net
http://lists.roundcube.net/mailman/listinfo/dev
[1] mailto:dev@lists.roundcube.net [2] http://lists.roundcube.net/mailman/listinfo/dev [3] mailto:ben@electricembers.net [4] http://code.google.com/p/phantomjs/wiki/WhoUsesPhantomJS
Right, ideally we would measure users' real experience (which includes the javascript running in their browsers, and rendering, and their own network connections) -- but we can only add resources to our own servers, so while we do care about how long RoundCube's javascript might take to run, it doesn't need to be a part of this tool, and we'll have to execute the test from a FreeBSD server, so Selenium is out. But thanks!
I was hoping to just be able to login via roundcube and get back the HTTP response(s) which would encompass our IMAP server, network latency, httpd+PHP cycles, and call that good enough. As use grows and performance falls, we'd be able to see that.
But if to authenticate via RoundCube requires executing some javascript, then doing this via wget or curl won't work. That is my question. Does submitting the login form require running javascipt code? I don't think it does because I can disable javascript in my browser and still login. . .
So how do I do this submission/authentication manually?