beat-report

1.0.9 • Public • Published

How to use it:

  1.   npm install beat-report
    
  2.   require(‘beat-report’).AllureProperties in your conf.js file
    
  3.   when you call generateProperties(browserName,locale,baseEnv), 
      it will generate test environment info in test report
    

Example:

var env = require('./configuration/environment.js'); var spec = require('./specs/specs.js'); var AllureProperties = require('beat-report').AllureProperties; var AllureReporter = require('jasmine-allure-reporter');

exports.config = {

specs: specs.specs,
capabilities: env.capabilities,
seleniumAddress: env.seleniumAddress,
directConnect: true,
params: {
    baseEnv : 'aribabox',
    timeOut : 5000,
},


framework: 'jasmine2',

jasmineNodeOpts: {
  defaultTimeoutInterval: 3000000,
  showColors: true
},

onPrepare: function() {
    jasmine.getEnv().addReporter(new AllureReporter({
        allureReport: {
            resultsDir: './allure/'
        }
    }));

    jasmine.getEnv().afterEach(function (done) {
        browser.takeScreenshot().then(function (png) {
            allure.createAttachment('Screenshot', function () {
                return new Buffer(png, 'base64')
            }, 'image/png')();
            done();
        })
    });

    var allureProperties = new AllureProperties();
    allureProperties.generateProperties('chrome','US','QA_Farm');

},

beforeLaunch: function() {
    return new Promise(function(resolve){
        reporter.beforeLaunch(resolve);
    });
},


afterLaunch: function(exitCode) {
    return new Promise(function(resolve){
        reporter.afterLaunch(resolve.bind(this, exitCode));
    });
},

};

Readme

Keywords

Package Sidebar

Install

npm i beat-report

Weekly Downloads

21

Version

1.0.9

License

ISC

Last publish

Collaborators

  • isabell