Closed
Bug 515209
Opened 15 years ago
Closed 15 years ago
Needs for a callback handler in between restart tests
Categories
(Testing Graveyard :: Mozmill, defect)
Testing Graveyard
Mozmill
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: whimboo, Assigned: mikeal)
References
Details
(Whiteboard: [verified-mozmill-1.2.7][mozmill-doc-needed])
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
Right now I work on my software update tests and for the fallback case I would have to modify some files on the system in between the tests to make the downloaded update invalid. Sadly there is no way to inject code in my CLI instance which gets called in between restarts. It would be nice to have such a way. I believe one parameter should be enough and which should tell the script the index of the last ran test.
This request is similar to bug 513881.
Reporter | ||
Updated•15 years ago
|
Severity: normal → major
Assignee | ||
Comment 1•15 years ago
|
||
So, this is what I can do.
I can add an API where one single Python file in the restart test directory can have a bunch of named functions.
A javascript function will be available inside your restart test that you can call with the function name. After that browser is killed, before the next one is started or the test moves on, the python function will be called with the JSON object you sent in javascript.
-Mikeal
Reporter | ||
Comment 2•15 years ago
|
||
The problem is that in some situations we have to execute code from the command line like a Python script and cannot do that from Firefox itself, e.g. while files are still in use. Given that requirement comment 1 would not be helpful for me.
Is it really so complicated to register a callback handler before running the test and calling this function with the persisted object as parameter?
Assignee | ||
Comment 3•15 years ago
|
||
So you want the Python callback to be fired right when you call this handler in JavaScript?
We can do that as well. The only caveat is that you won't be able to get information from Python back in to JavaScript.
Reporter | ||
Comment 4•15 years ago
|
||
No. I want to have this handler called when Firefox has been closed. There is nothing with Javascript involved. Just a Python thing.
Reporter | ||
Comment 5•15 years ago
|
||
Mikeal, isn't that fixed already? I cannot find any checkin in your master.
Assignee: nobody → mrogers
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•15 years ago
|
||
Yeah, this is fixed. There isn't one checkin in particular, the work was done in a branch and then merged last week to my master.
http://github.com/mikeal/mozmill
Reporter | ||
Comment 7•15 years ago
|
||
Marking as fixed. Will test it tomorrow.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-1.2.7]
Reporter | ||
Comment 8•15 years ago
|
||
Mikeal, is there a way to throw any failure from within the Python callback?
Assignee | ||
Comment 9•15 years ago
|
||
yup, just throw an exception. That's how you are suppose to trigger test failures :)
Reporter | ||
Comment 10•15 years ago
|
||
Ok, I have tested the current implementation and I don't see a way how to pass values from the mozmill test to the Python callback function. We really have to pass the persisted object to the callback so you can exchange data. Otherwise the callbacks aren't much helpful. Mikeal, would this be an easy fix?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 11•15 years ago
|
||
Mikeal, I would expect those tests to be working. It looks like we still don't pass the correct values back and forward.
Reporter | ||
Comment 12•15 years ago
|
||
As given by Mikeal on IRC we aren't able to pass values back to the Mozmill test because Python callbacks are run asynchronously and the test doesn't wait until it has been finished. We will call this bug the base implementation. Further improvements have to be filed in follow-up bugs.
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•15 years ago
|
Status: RESOLVED → VERIFIED
Whiteboard: [mozmill-1.2.7] → [verified-mozmill-1.2.7]
Reporter | ||
Updated•15 years ago
|
Whiteboard: [verified-mozmill-1.2.7] → [mozmill-1.2.7][mozmill-doc-needed]
Reporter | ||
Updated•15 years ago
|
Whiteboard: [mozmill-1.2.7][mozmill-doc-needed] → [verified-mozmill-1.2.7][mozmill-doc-needed]
Updated•8 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•