Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#12625 closed defect (fixed)

DOH Plugin mechanism

Reported by: Sam Foster Owned by: Sam Foster
Priority: high Milestone: 1.7
Component: TestFramework Version: 1.6.0
Keywords: Cc:
Blocked By: Blocking:

Description

DOH needs a generalized way to load in additional functionality. This is necessary for the result reporting, and would also satisfy peoples hankering for a richer assertion API - as people could load in a module with defined additional methods.

Attachments (3)

12625_dohPlugins.patch (2.6 KB) - added by Sam Foster 9 years ago.
[CLA] [PATCH] Proposed DOH plugins implementation
12625.patch (1.1 KB) - added by haysmark 8 years ago.
Updated patch.
dohpatch.patch (16.3 KB) - added by haysmark 8 years ago.
Plugins for reporting results.

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by Sam Foster

Attachment: 12625_dohPlugins.patch added

[CLA] [PATCH] Proposed DOH plugins implementation

comment:1 Changed 9 years ago by Sam Foster

Status: newassigned

comment:2 Changed 9 years ago by Sam Foster

the patch adds a dohPlugins param to both the browser and rhino runner, which works just like testModule in that its a delimited list of modules that get loaded/required before doh runs. Those test modules can inject themselves into doh, override methods or generally extend it to do useful stuff.

I've added a hello-world plugin that just logs out a message before doh runs. Ideally doh would provide some more useful hooks, as well as collect more results (instead of just logging them out). But neither is necessary for plugins to be useful, so I'd like to commit this as-is and build from there.

Changed 8 years ago by haysmark

Attachment: 12625.patch added

Updated patch.

comment:3 Changed 8 years ago by haysmark

Milestone: tbd1.7

I updated your patch to work with the massive doh rewrite, let me know if you think I missed an intention. I hope to commit this code soon.

comment:4 Changed 8 years ago by haysmark

I appended the full patch.

Changed 8 years ago by haysmark

Attachment: dohpatch.patch added

Plugins for reporting results.

comment:5 Changed 8 years ago by Sam Foster

Resolution: fixed
Status: assignedclosed

I've committed r24673 which is just the dohPlugins param handling in runner.html, and a couple of simple, sample plugins in doh/plugins. Given the tight window to get features in for 1.7, this seemed a safe but useful minimum.

The reporting plugin probably belongs in #8578 or a new ticket? I'd like to break that up a bit so we can:

a) leverage code from the node and rhino runners b) separate out the results data collection from actually posting the results - they could be separate modules I think

btw. I have some doubts that path / registerModulePath param is working, but I'll investigate and file a separate ticket if not

comment:6 Changed 8 years ago by Sam Foster

(In [24674]) README typos Refs #12625

Note: See TracTickets for help on using tickets.