Closed Bug 561926 Opened 15 years ago Closed 14 years ago

test harness should allow serving of static files via webserver

Categories

(Add-on SDK Graveyard :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dietrich, Assigned: KWierso)

Details

Attachments

(1 file)

a web server would help a lot with testing widgets with URL content, or testing the Request module, for example. we could have a "static" directory under a package's test directory. if that static directory exists, have cuddlefish start the server w/ that dir as root, before it kicks off the test run. it would have to expose the server URL to the test environment.
While I agree with this for integration testing or cases where we aren't able to use mocks/stubs/fakes, I'd also like to note that we should probably also add a mock XHR class to the SDK and encourage folks to use it, particularly since mocks are really fast and can be used to simulate conditions that are potentially difficult to duplicate in practice. Other than that, though, this sounds like a great idea!
Just filed bug 562234 for the mock XHR class, btw.
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product. To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
OS: Linux → All
Priority: -- → P3
Hardware: x86 → All
Target Milestone: --- → Future
Priority: P3 → P2
Target Milestone: Future → 1.3
(Pushing all open bugs to the --- milestone for the new triage system)
Target Milestone: 1.3 → ---
asqueella has done this: http://asqueella.blogspot.com/2011/01/javascript-http-server-as-module-for.html So we just need to get it into api-utils as a low-level internal module so we can use it in our own unit tests (including some that are already written but are disabled for lack of this functionality).
So, https://github.com/mozilla/addon-sdk/pull/258 pulls in asqueella's httpd module, for whoever wants to review it.
And a pointer to keep track of it here on bugzilla.
Attachment #573272 - Flags: review?(myk)
Comment on attachment 573272 [details] Pointer to pull request 258 Thanks for putting this together! Just a few issues, comments in the pull request.
Attachment #573272 - Flags: review?(myk) → review-
Comment on attachment 573272 [details] Pointer to pull request 258 Additional review and updates occurred in the pull request, r=myk.
Attachment #573272 - Flags: review- → review+
Assignee: nobody → kwierso
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: