var request = require('superagent');

module.exports = {
    "Load front page": function(browser) {
        browser
            .url("http://localhost:44199")
            .waitForElementVisible('body', 1000)
            .assert.containsText('.login', 'Sign in')
            .end();
    },

    tearDown: function(done) {
        var userName = this.client.options.username;
        var accessKey = this.client.options.access_key;

        console.log('tearDown started');

        if (userName && accessKey) {
            request
                .put('https://saucelabs.com/rest/v1/' + userName + '/jobs/' + this.client.sessionId)
                .send({ passed: true })
                .auth(userName, accessKey)
                .end(function(error, res){
                    if (error) {
                        console.log('ERROR sending verdict');
                        console.log(error);
                    } else {
                        console.log('Verdict sent to Sauce Labs, response:' + res.res.statusMessage);
                    }

                    done();
                });
        }
    }
};

var request = require('superagent');

module.exports = {
    "Load front page": function(browser) {
        browser
            .url("http://localhost:44199")
            .waitForElementVisible('body', 1000)
            .assert.containsText('.login', 'Sign in')
            .end();
    },

    tearDown: function(done) {
        var userName = this.client.options.username;
        var accessKey = this.client.options.access_key;

        console.log('tearDown started');

        if (userName && accessKey) {
            request
                .put('https://saucelabs.com/rest/v1/' + userName + '/jobs/' + this.client.sessionId)
                .send({ passed: true })
                .auth(userName, accessKey)
                .end(function(error, res){
                    if (error) {
                        console.log('ERROR sending verdict');
                        console.log(error);
                    } else {
                        console.log('Verdict sent to Sauce Labs, response:' + res.res.statusMessage);
                    }

                    done();
                });
        } else {
            console.log('User name or access key missing, name: ' + userName + ', key: ' + accessKey);
            console.log(this.client);
            done();
        }
    }
};

Add test reporting debug logging
Add test reporting debug logging
