Run Jest tests with Task Cluster
Categories
(DevTools :: Netmonitor, enhancement, P3)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: Honza, Assigned: ns19041997)
Details
Attachments
(1 file)
Network monitor code base would benefit from having some Jest/Enzyme tests that runs continuously on Try.
Similar support (but for mocha tests) was done for the Console panel in bug 1312823.
Honza
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 2•6 years ago
|
||
Nicolas, why I don't see any jest tests in this try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a6154c89d56564bf8dc969abe5c2450a729b9c5f&selectedJob=239088573
I used the following try syntax:
try: -b do -p linux64 -u devtools-tests,mochitest-dt -t none --artifact
Honza
Reporter | ||
Comment 3•6 years ago
|
||
Another try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7e9a08ab54a5ecf80e969a7e857f3c159287a266
But doesn't seem to work for me.
Honza
Comment 4•6 years ago
|
||
I think maybe it's because the glob for the when: files-changed:
is erroneous (like the console one):
Could you try by changing it to:
when:
files-changed:
- 'devtools/client/aboutdebugging-new/src/components/**'
- 'devtools/client/framework/components/**'
- 'devtools/client/webconsole/**/*.js'
- 'devtools/client/netmonitor/**/*.js'
Or maybe put specific folders you want to watch, like aboutdebugging-new
is doing?
Reporter | ||
Comment 5•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b12c0cca0aabf4246db2df8923ffcaf278ef1597
Still doesn't seem to work for me.
Honza
Hi @honza, @nchevobbe, @davidwalsh
I started the try run with try: -b do -p linux64 -u devtools-tests,mochitest-dt -t none --artifact
but devtools node tests were not being run, so I added a new job on try itself. The added task is named: source-test-node-devtools-tests. This runs the jest tests as shown in the log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=239330319&repo=try&lineNumber=69. The jest test for the reducer passes once but is run again and fails on second run due to a missing &&
that I'll add and run again.
I ran again with try: -b do -p linux64 -u devtools-tests,source-test-node-devtools-tests -t none --artifact
, but still I have to add the node tests using "Add new job".
Hi,
I have fixed the missing &&
issue, and scheduled 2 try runs, one with ./mach try -b do -p linux64 -u devtools-tests,mochitest-dt -t none --artifact
and other with ./mach try -b do -p linux64 -u devtools-tests,source-test-node-devtools-tests -t none --artifact
. The devtools node tests still were not being run so I added a new job from "Add New Job(Fuzzy)" on treeherder with the job title as "source-test-node-devtools-tests" and the tests pass here: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=239386506&repo=try&lineNumber=326 !
What I think the issue is that we are missing the exact node tests clause to add to the try command.
Reporter | ||
Comment 8•6 years ago
•
|
||
Thanks for the update!
The patch/setup is correct and I can also see green try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=48c1d5efdea6f10c3cfbc3aa56a41704b9d51a3b&searchStr=devtools&selectedJob=240895164
In order to run on try we could define a new preset netmonitor-tests
in this file:
https://searchfox.org/mozilla-central/source/tools/tryselect/try_presets.yml
Similar to what is there for debugger-tests
:
https://searchfox.org/mozilla-central/source/tools/tryselect/try_presets.yml#12-22
The new preset would be run as follows:
./mach try --preset netmonitor-tests
In any case, this should be done in a followup bug
Honza
Comment 10•6 years ago
|
||
bugherder |
Description
•