Closed Bug 643473 Opened 13 years ago Closed 10 years ago

endTest passes redundant data -- passes and passed

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: k0scist, Assigned: sambuddhabasu1, Mentored)

References

()

Details

Attachments

(1 file)

frame.js passes both the passes and fails as well as the length of the
passes and fails: 

https://github.com/mozautomation/mozmill/blob/master/mozmill/mozmill/extension/resource/modules/frame.js#L192

This should be done at the event-consumer level, not the event-sender level
Assignee: nobody → jhammel
Whiteboard: [mozmill-2.0?]
Assignee: jhammel → nobody
Assignee: nobody → jhammel
Whiteboard: [mozmill-2.0?] → [mozmill-2.0+]
Whiteboard: [mozmill-2.0+] → [mozmill-next?]
Whiteboard: [mozmill-next?] → [mozmill-2.0-][mozmill-next?]
Assignee: jhammel → nobody
The location of the code has been changed. It's available now here:
https://github.com/mozilla/mozmill/blob/master/mozmill/mozmill/extension/resource/modules/frame.js#L200
Whiteboard: [mozmill-2.0-][mozmill-next?] → [mentor=whimboo][lang=js][lang=py][good first bug]
Mentor: hskupin
Whiteboard: [mentor=whimboo][lang=js][lang=py][good first bug] → [lang=js][lang=py][good first bug]
I am interested in solving this bug. Can someone assign it to me?
Sure. It's great to see that you have interest to work on it. I love to see it fixed. Thanks in advance!
Assignee: nobody → sammygamer
Status: NEW → ASSIGNED
Hey Sambuddha, I am checking in with this bug to see if you have all the information you need.  Feel free to ask in the bug if you get stuck or need help.
Assignee: sammygamer → nobody
Status: ASSIGNED → NEW
:whimboo, can you outline what needs to be done here?  I am reading the bug in more details and really have no idea what to do.  I would like to know:
* what parameters to include in https://github.com/mozilla/mozmill/blob/master/mozmill/mozmill/extension/resource/modules/frame.js#L200
* what other code references this and should be modified
* what tests need to be written
* other caveats that might make this a difficult patch to r+
Flags: needinfo?(hskupin)
Well, it's just this code here as outlined above:
https://github.com/mozilla/mozmill/blob/master/mozmill/mozmill/extension/resource/modules/frame.js#L197

So the length of both objects has to be computed by the event consumer and not the sender.
Flags: needinfo?(hskupin)
so we should remove those two variables and do nothing else?  Any tests to write/update?  Any consumers that call or depend on this that need to be updated?

Without clear information this shouldn't be a good first bug, it could be a "good next bug" though.  I think this is a simple bug, just lacking some more well defined instructions.
As the whiteboard says js and py is involved. So the JS side is the event-producer and the Pyhton side the event-consumer. As comment 0 says, the consumer (here the endTest listener) should set those properties.
can you link to the python consumer?
Hey Henrik, it would be great if you could assign this bug to me.
Assignee: nobody → sammygamer
Status: NEW → ASSIGNED
Comment on attachment 8481341 [details] [diff] [review]
endTest passes redundant data -- passes and passed

Review of attachment 8481341 [details] [diff] [review]:
-----------------------------------------------------------------

::: mozmill/mozmill/__init__.py
@@ -414,5 @@
>  
>                      # see frame.js:events.endTest
>                      obj = {'filename': test['path'],
> -                           'passed': 0,
> -                           'failed': 0,

The removal here is fine, but you also have to update the code inside the endTest listener as stated in one of my comments before.

Also please check for other instances. Under report_disconnect() we have the same construct.

::: mozmill/mozmill/logger.py
@@ +239,5 @@
>  
>      def endTest(self, test):
>          filename = self.mozmill.running_test.get('relpath', test['filename'])
> +        test['passed'] = len(test['passes'])
> +        test['failed'] = len(test['fails'])

Those lines you will have to add to the endTest listener in __init__.py. Here it is not necessary. For the one length check below you can directly use the above without a temporary variable.
Attachment #8481341 - Flags: review?(hskupin) → review-
Andrei, I wonder if we completely could get rid of these properties. I know that we would have to update the dashboard code to not base on the passed and failed properties. Do you think its worth the time? Otherwise we will leave it and wait which changes we would have to do for treeherder. I mostly would favor that.
Flags: needinfo?(andrei.eftimie)
I would still leave them for now. mozmill-dashboard is already slow when showing a result, this would add more overhead in showing a result.

(Not sure if it would be significant or not, we would have to do some timing checks).

I agree we should wait for treeherder since we will most likely need to overhaul most of the report code for it.
Flags: needinfo?(andrei.eftimie)
Mozmill will reach its end of life soon. We are currently working on getting
all the tests for Firefox ported to Marionette. For status updates please see
bug 1080766.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Whiteboard: [lang=js][lang=py][good first bug]
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: