I installed jasmine-spec-reporter to replace the default DOT reporter.
Everything is great running, but I want to send the texts I'm seeing in the terminal directly to slack. What is the payload that I should send to slack? and is it possible?
I installed jasmine-spec-reporter to replace the default DOT reporter.
Everything is great running, but I want to send the texts I'm seeing in the terminal directly to slack. What is the payload that I should send to slack? and is it possible?
On
You should do a custom integration from slack incoming webhook app. Copy the webhook url which variants on which channel you want to post the output.
Then in protractor conf.js add the following
projectName: ' ',
environment: 'TEST',
slackUrl: 'https://hooks.slack.com/services/T1J252SLS/',
channel: '#autotests'
On
You could use npm jasmine-slack-reporter package for this.
exports.config = {
seleniumAddress: "http://localhost:4444/wd/hub",
specs: ['todo-spec.js'],
capabilities: {
browserName: 'chrome',
},
onPrepare: function () {
var webRep = require('jasmine-slack-reporter');
browser.getProcessedConfig().then(function (config) {
var browserName = config.capabilities.browserName;
jasmine.getEnv().addReporter(new webRep.WebReporter({
projectName: 'Project 1',
environment: 'Stage',
slackUrl: "YOUR_WEBHOOK_URL",
channel: '#dashboard-standup'
}));
});
},
};
You could use slack-cli to send your test output to slack.
For example, if your test command is
jasmine, something like that should do the trick (not tested):