title: Allure reports using protractor and jasmine - Jenkins
body: <p>I have problem with generate allure report in jenkins.</p>
  
  <p>I will try to describe my projesc briefly.
  I use protractor and jasmine, here is my project in WebStorm (structure):</p>
  
  <p><a href="https://i.stack.imgur.com/cClVr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cClVr.png" alt="enter image description here"></a></p>
  
  <p>My config.js</p>
  
  <p>exports.config = {</p>
  
  <pre><code>framework: 'jasmine2',
  
  seleniumAddress: 'http://localhost:4444/wd/hub',
  
  capabilities: {
      browserName: 'firefox'
  },
  
  suites: {
      smoke: ['tests/smoke/LoginTest.js'],
  },
  
  baseUrl : 'www.myurl.com',
  
      onPrepare: function () {
          var AllureReporter = require('jasmine-allure-reporter');
          jasmine.getEnv().addReporter(new AllureReporter());
          jasmine.getEnv().afterEach(function(done){
              browser.takeScreenshot().then(function (png) {
                  allure.createAttachment('Screenshot', function () {
                      return new Buffer(png, 'base64')
                  }, 'image/png')();
                  done();
              })
          });
      }};
  </code></pre>
  
  <p>I've installed Allure plugin in Jenkins, created multi-conf project, and configured it like that:</p>
  
  <p><a href="https://i.stack.imgur.com/zs8ah.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zs8ah.png" alt="enter image description here"></a></p>
  
  <p>After Run build in Jenkins build fails (put browser window is opening and test pass). Output from my console:</p>
  
  <p><a href="https://i.stack.imgur.com/54AMA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/54AMA.png" alt="enter image description here"></a></p>
  
  <p>But something is generating in workspace:</p>
  
  <p><a href="https://i.stack.imgur.com/TFVN0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TFVN0.png" alt="enter image description here"></a></p>
  
  <p>But my Allure Report is empty:</p>
  
  <p><a href="https://i.stack.imgur.com/ohu1b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ohu1b.png" alt="enter image description here"></a></p>
  
  <p>I've noticed that when I comment in config.js:</p>
  
  <pre><code> onPrepare: function () {
              var AllureReporter = require('jasmine-allure-reporter');
              jasmine.getEnv().addReporter(new AllureReporter());
              jasmine.getEnv().afterEach(function(done){
                  browser.takeScreenshot().then(function (png) {
                      allure.createAttachment('Screenshot', function () {
                          return new Buffer(png, 'base64')
                      }, 'image/png')();
                      done();
                  })
              });
          }
  </code></pre>
  
  <p>Then build success.</p>
  
  <p><a href="https://i.stack.imgur.com/huCcS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/huCcS.png" alt="enter image description here"></a></p>
  
  <p>So the problem is that I don't know what I missed or what I do wrong it's not gerating/opening this report. Maybe someone smarter than me will tell mi where I'm doing mistake becouse I have no idea</p>