Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

by Prasant Sutaria

Problem:

An unexpected number of results in Digital Zoom's CI dashboard.

Cause:

Jasmine framework provides two options to disable some specs from a spec file:

...

Expected test count is 1 but in Digital Zoom's CI dashboard we are getting unexpected count 2 test.

Solution:

To prevent unexpected reports in Digital Zoom's CI Dashboard following solution can be implemented:
  1. Use xit option to exclude specs in a spec file instead of fit option.
  2. When xit option is used, Jasmine provides a pending reason - "Temporarily disabled with xit" for the excluded specs. We can use the pending reason to check whether reporting in Digital zoom should be started or not

    Code Block
    languagejs
    themeMidnight
    titlespec started
    // Start of Spec
    specStarted: function (result) {
       if(result.pendingReason!=='Temporarily disabled with xit'){
          browser.reportingClient.testStart(result.fullName);
       }
    },

...