next phase - putting stuff in mozilla/testing

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

next phase - putting stuff in mozilla/testing

Dave Liebreich
I've been out of the office for 2 of the 3 weeks since mozilla/testing
was created.  During that time, the following code has landed in that
module:

tinderbox standalone tests (bug 343899)
memory test for firefox (bug 344168)
compare-locales tool (bug 345076)
release verification scripts (bug 346013)

Now it is time for the next set of stuff, and I could use some help.

I've opened bugs 346703 and 346706 to add two simple unit-style tests to
the tree.  After they are added, I'd like to factor out the common
harness and framework stuff to mozilla/testing.

I'd like to put a copy of jsunit into mozilla/testing, then use it for
the proof-of-concept jsunit tests we've already written.

I'd also like to port enough of jsunit to chrome so that tests can do
privileged stuff like set preferences and cover functional areas like
phishing detection, pop-up blocking, and search plugins.

Bug 343199 is open to make jssh work as a standalone extension.  I've
written python code to drive firefox via jssh and run some tests.  This
all needs to land.

We need to create wiki pages, probably linked to
http://wiki.mozilla.org/SoftwareTesting, to provide examples of how to
write tests for these harnesses, as well as track these projects.

There's more to spec out and discuss, which I hope to be doing over the
next week or so.  Please discuss here or ping me on #qa if you want to
become involved.

Thanks

Dave

--
Dave Liebreich
Test Architect, Mozilla Corporation
_______________________________________________
dev-quality mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-quality
Reply | Threaded
Open this post in threaded view
|

Re: next phase - putting stuff in mozilla/testing

Dave Liebreich
Dave Liebreich wrote:

> I've opened bugs 346703 and 346706 to add two simple unit-style tests to
> the tree.  After they are added, I'd like to factor out the common
> harness and framework stuff to mozilla/testing.

Discussions in bug 346706 have led to the question: where should unit
tests live?

I initially put them in the same directory as the code under test.

Darin and Jeff suggested a different approach.

I propose the following:

foo/src
foo/public
foo/tests <- tests for stuff in src

both public and src exist for update and protocol/http, so this works
for both of my simple unit tests.

If there are no such directories (e.g.
toolkit/mozapps/update/src/updater), then make a tests subdirectory of
that directory.

"make check" should run all tests in ., ./tests, and ../tests (I'm not
sure about this - I think we need to try it out)

comments?

--
Dave Liebreich
Test Architect, Mozilla Corporation
_______________________________________________
dev-quality mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-quality
Reply | Threaded
Open this post in threaded view
|

Re: next phase - putting stuff in mozilla/testing

Boris Zbarsky
Dave Liebreich wrote:
> foo/src
> foo/public
> foo/tests <- tests for stuff in src

This doesn't map that well to, say content/ where we have all sorts of public
and src dirs and kinda need several of them together to get anywhere close to a
reasonable test.... (which is why the tests are just in content/tests right now).

-Boris
_______________________________________________
dev-quality mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-quality
Reply | Threaded
Open this post in threaded view
|

Re: next phase - putting stuff in mozilla/testing

Boris Zbarsky
Boris Zbarsky wrote:
> Dave Liebreich wrote:
>> foo/src
>> foo/public
>> foo/tests <- tests for stuff in src
>
> This doesn't map that well to, say content/ where we have all sorts of
> public and src dirs and kinda need several of them together to get
> anywhere close to a reasonable test.... (which is why the tests are just
> in content/tests right now).

I just realized the real question is whether to put the tests in foo/src or in
foo/tests. I'd prefer foo/tests.

-Boris
_______________________________________________
dev-quality mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-quality
Reply | Threaded
Open this post in threaded view
|

Re: next phase - putting stuff in mozilla/testing

Christian Biesinger
In reply to this post by Dave Liebreich
Dave Liebreich wrote:
> I propose the following:
>
> foo/src
> foo/public
> foo/tests <- tests for stuff in src

Hm... so the current tests that we have are in a mozilla/<module>/test
directory. Would you move them? What about tests that test how various
stuff in a module works together?


> "make check" should run all tests in ., ./tests, and ../tests (I'm not
> sure about this - I think we need to try it out)

What about tests in the subdirectories? I'm not sure that it should run
tests in the parent directory, but maybe that makes sense.
_______________________________________________
dev-quality mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-quality