Closed Bug 563523 Opened 15 years ago Closed 15 years ago

Create script to start a Mozmill test-run against specific builds

Categories

(Mozilla QA Graveyard :: Mozmill Automation, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Similar to the software update script we need a script which is performing the following actions: * Installing a build * Running normal tests * Running restart tests * Uninstalling the build If an already installed build should be used, only steps 2 and 3 have to be performed.
Whiteboard: [mozmill-automation]
Summary: Create script to start a Mozmill test-run against a specific build → Create script to start a Mozmill test-run against specific builds
Blocks: 564537
Blocks: 564539
First versions of the scripts are available. Clint, can you please review? http://github.com/whimboo/mozmill/commit/d918024a46b236dc4ac9a54f4ea9a5a5dfcadee9 http://github.com/whimboo/mozmill/commit/527a8af19663c137b338acb5ad1729685d63bb81 http://github.com/whimboo/mozmill/commit/23418ac9b869fe974a8219c191cb75ad9d91cabf Please be aware that the 3rd patch contains updates to the software update script which have been added by accident. I will update the script on bug 564539.
(In reply to comment #2) > First versions of the scripts are available. Clint, can you please review? > > http://github.com/whimboo/mozmill/commit/d918024a46b236dc4ac9a54f4ea9a5a5dfcadee9 > http://github.com/whimboo/mozmill/commit/527a8af19663c137b338acb5ad1729685d63bb81 > http://github.com/whimboo/mozmill/commit/23418ac9b869fe974a8219c191cb75ad9d91cabf > > Please be aware that the 3rd patch contains updates to the software update > script which have been added by accident. I will update the script on bug > 564539. Harth, I need some help on the reviews. Can you take these three, please?
There were two little failures which break all test-runs. Here is the fix: http://github.com/whimboo/mozmill/commit/9eda22070596f133815352bd5f2a77d3e88cbb01
re: https://bugzilla.mozilla.org/show_bug.cgi?id=565733#c7 > > > http://github.com/whimboo/mozmill/blob/firefox-automation/scripts/firefox-automation/testrun_bft.py#L46 > > > > Now I'm confused. I like that there is a main() function instead of a CLI > > class. What I like less well is the magic setting of attributes in `run` from > > the command line. Shouldn't these be passed in to the ctor? > > Can you please comment on bug 563523 why it would be better to pass it to the > ctor? IMO I would bind the TestRun classes too much to any CLI implementations. For instance, you have: {{{ run = BftTestRun() run.binaries = args run.logfile = options.logfile run.report_url = options.report run.run() }}} BftTestRun inherits from TestRun. TestRun__init__() takes *args and **kwargs but does not use them: http://github.com/whimboo/mozmill/blob/firefox-automation/scripts/firefox-automation/libs/testrun.py#L53 Instead of setting having expected attributes to be set on the class, why not pass these into the constructor? e.g. {{{ class TestRun(object): def __init__(self, binaries=None, logfile=None, report_url=None): self.binaries = binaries or [] self.logfile = logfile self.report_url = report_url ... }}} In this way, what the API is documented in the code instead of dependent upon certain attributes being set from extrinsic sources.
In such a case you would have to create a new instance of any of the testrun classes if one of the options are changing. But what I can do is to add options to the ctor and leave the properties for later usage. Would that be a better approach?
(In reply to comment #4) > Follow-up with mentioned review comments: > http://github.com/whimboo/mozmill/commit/302360999e65d3d9cc1a21af98644fc70126c598 The removal of all setters/getters is good. They're really not useful in python. The rest looks like fine stylistic niceties
(In reply to comment #5) > There were two little failures which break all test-runs. Here is the fix: > http://github.com/whimboo/mozmill/commit/9eda22070596f133815352bd5f2a77d3e88cbb01 Looks good
Merged to master.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Blocks: 566761
Move of Mozmill related project bugs to newly created components. You can filter out those emails by using "Mozmill-Tests-to-MozillaQA" as criteria.
Component: Mozmill → Mozmill Automation
Product: Testing → Mozilla QA
QA Contact: mozmill → mozmill-automation
Whiteboard: [mozmill-automation]
Version: Trunk → unspecified
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.