Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed tests not being flagged in SauceLabs? #172

Open
sgarbesi opened this issue Nov 18, 2014 · 0 comments
Open

Failed tests not being flagged in SauceLabs? #172

sgarbesi opened this issue Nov 18, 2014 · 0 comments

Comments

@sgarbesi
Copy link

I have a number of a tests that I'm attempting to run via SauceLabs.

At first one of the problems I had was when a single browser failed, any other browsers set to be tested next in line would never get tested. I've seemed to have fixed that problem, only to find this new problem where the tests that are failing aren't being flagged as having failed in SauceLabs.

Here's the code from my Gruntfile.js which runs the tests:

me.tasks.tests = function() {
    me.grunt.registerTask('tests', function() {
        var done = this.async();
        var series = [];
        var success = true;
        var tasks = {};

        Object.keys(me.grunt.config.data.karma).forEach(function(key) {
            if (key === 'dev' || key === 'options') {
                return;
            }

            var task = 'karma:' + key;
            tasks[task] = 0;

            series.push(function(callback) {
                me.grunt.util.spawn({
                    args: [task],
                    grunt: true,

                    opts: {
                        stdio: 'inherit'
                    }
                }, function(error, result, code) {
                    tasks[task] = code;

                    if (code !== 0) {
                        success = false;
                    }

                    callback();
                });
            });
        });

        me.async.parallelLimit(series, 1, function() {
            done(success);
        });
    });
};

The code is telling Grunt to keep going if a single browser fails, but the plugin should still report that a specific browser test failed to SauceLabs?

Reproduction:

git clone https://github.com/dolox/fallback.git;
cd fallback;
git checkout v2;
npm install -g grunt-cli bower;
npm install;
bower install;
grunt tests;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant