Displaying Tests tab

We have a simple build step that runs Protractor tests in TeamCity 9.1.3:

Runner Type: Command Line
Command Executable: protractor
Command Parameters: conf.js --params.environment=acc --teamcity

conf.js contains the code to initialize jasmine-reports:

    onPrepare: function () {
        jasmine.getEnv().addReporter(new jasmine.TeamcityReporter());

After running this step, we used to receive a " Tests failed: x, passed: y" message and we used to have a Tests tab in the build results. But after we made some misc changes in the project, this step no longer displays the Tests tab, and its message now is "Success", instead of the "Tests passed \ failed" message.

What is the setting that controls showing / hiding the Tests tab in this case?

(We have TeamCity settings source-controlled in Git, if that helps. But I've had a look at all the changes made before this stopped working, and couldn't figure out what generated this problem...)

1 comment
Comment actions Permalink

Apparently this was caused by a problem in jasmineReporters. Changing to the following init code made it work again:

onPrepare: function () {
        var jasmineReporters = require('jasmine-reporters');

        // returning the promise makes protractor wait for the reporter config before executing tests
        return browser.getProcessedConfig().then(function (config) {
            var teamcityReporter = new jasmineReporters.TeamCityReporter();

Also - the first step when debugging this kind of problem is to make sure that the runner is still outputing info in TeamCity format (##teamcity[testSuiteStarted name='...)


Please sign in to leave a comment.