Closed Bug 1539530 Opened 6 years ago Closed 6 years ago

Run Jest tests with Task Cluster

Categories

(DevTools :: Netmonitor, enhancement, P3)

enhancement

Tracking

(firefox68 fixed)

RESOLVED FIXED
Firefox 68
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

Assignee: nobody → ns19041997
Status: NEW → ASSIGNED
Priority: -- → P3

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

Flags: needinfo?(nchevobbe)

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?

Flags: needinfo?(nchevobbe)

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.

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

Pushed by jodvarko@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bcd85ff387fb Setting up Jest tests with Task Cluster r=Honza
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: