r3b / grunt-protractor-coverage

Coverage analysis for Protractor tests
Apache License 2.0
38 stars 29 forks source link

not able to run gruntfile included in npm package #27

Closed sanjeevmajgotra closed 9 years ago

sanjeevmajgotra commented 9 years ago

I'm new to nodejs programming so please help me out here. I'm not able to execute the deafult gruntfile included in Window's seven environement. The basic error i'm getting is 1) Exception loading: C:\Users\AppData\Local\Temp\1415630349701.6733 Error Message: Error: Cannot find module 'coverage-collector' Stacktrace: Error: Cannot find module 'coverage-collector' at require (module.js:380:17) at Object. (C:\Users\majgotra\AppData\Local\Temp\1415630349701.6733:3:1) . But I've checked inside the local node_modules folder and the coverage-collector folder is there. I've even tried deleting and then reinstalling it but nothing helped. PFB the full stack trace Running "jshint:all" (jshint) task

3 files lint free.

Running "clean:tests" (clean) task Cleaning "instrumented"...OK Cleaning "coverage"...OK Cleaning "reports"...OK

Running "copy:instrument" (copy) task Created 12 directories, copied 7 files

Running "instrument" task OK OK OK OK OK OK OK OK OK OK OK

Running "connect:server" (connect) task Started connect web server on http://0.0.0.0:3000

Running "protractor_coverage:local" (protractor_coverage) task Collector started on port 3001 Using the selenium server at http://localhost:4444/wd/hub Exception loading: C:\Users\majgotra\AppData\Local\Temp\1415630482346.2195 Error - fail

Failures:

1) Exception loading: C:\Users\majgotra\AppData\Local\Temp\1415630482346.2195 Error Message: Error: Cannot find module 'coverage-collector' Stacktrace: Error: Cannot find module 'coverage-collector' at require (module.js:380:17) at Object. (C:\Users\majgotra\AppData\Local\Temp\1415630482346.2195:3:1)

Finished in 0.007 seconds 1 test, 1 assertion, 1 failure

Test failed but keep the grunt process alive. Shutdown requested

Running "makeReport" task ---------- ----------- ----------- ----------- ----------- File % Stmts % Branches % Funcs % Lines
---------- ----------- ----------- ----------- -----------
All files 100 100 100 100
---------- ----------- ----------- ----------- -----------

OK

Running "coveralls:main" (coveralls) task

Can you please help

r3b commented 9 years ago

I think this PR might solve your problem: https://github.com/r3b/grunt-protractor-coverage/pull/28 I released it as v0.2.13 on npm

kalyan542 commented 9 years ago

I am getting this below error when i run the grunt file.Could you please help me in this. C:\Users\Administrator\Desktop\grunt-protractor-coverage-master>grunt Running "clean:tests" (clean) task

3 paths cleaned.

Running "copy:instrument" (copy) task Created 12 directories, copied 7 files

Running "instrument" task OK OK OK OK OK OK OK OK OK OK OK

Running "connect:server" (connect) task Started connect web server on http://0.0.0.0:3000

Running "protractor_coverage:local" (protractor_coverage) task Collector started on port 3001 Using the selenium server at http://localhost:4444/wd/hub [launcher] Error: Error: ECONNREFUSED connect ECONNREFUSED at ClientRequest. (C:\Users\Administrator\AppData\Roaming\npm\nod e_modules\protractor\node_modules\selenium-webdriver\http\index.js:145:16) at ClientRequest.emit (events.js:95:17) at Socket.socketErrorListener (http.js:1551:9) at Socket.emit (events.js:95:17) at net.js:440:14 at process.tickCallback (node.js:419:13) ==== async task ==== WebDriver.createSession() at Function.webdriver.WebDriver.acquireSession (C:\Users\Administrator\AppD ata\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webd river\webdriver.js:149:22) at Function.webdriver.WebDriver.createSession (C:\Users\Administrator\AppDat a\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdri ver\webdriver.js:123:30) at Builder.build (C:\Users\Administrator\AppData\Roaming\npm\node_modules\pr otractor\node_modules\selenium-webdriver\builder.js:294:22) at HostedDriverProvider.getDriver (C:\Users\Administrator\AppData\Roaming\np m\node_modules\protractor\lib\driverProviders\hosted.js:63:9) at C:\Users\Administrator\AppData\Roaming\npm\node_modules\protractor\lib\ru nner.js:222:41 at _fulfilled (C:\Users\Administrator\AppData\Roaming\npm\node_modules\protr actor\node_modules\q\q.js:797:54) at self.promiseDispatch.done (C:\Users\Administrator\AppData\Roaming\npm\nod e_modules\protractor\node_modules\q\q.js:826:30) at Promise.promise.promiseDispatch (C:\Users\Administrator\AppData\Roaming\n pm\node_modules\protractor\node_modules\q\q.js:759:13) at C:\Users\Administrator\AppData\Roaming\npm\node_modules\protractor\node_m odules\q\q.js:573:44

Test failed but keep the grunt process alive. Shutdown requested

Running "makeReport" task ---------- ----------- ----------- ----------- ----------- File % Stmts % Branches % Funcs % Lines
---------- ----------- ----------- ----------- -----------
All files 100 100 100 100
---------- ----------- ----------- ----------- -----------

OK

Running "coveralls:main" (coveralls) task [error] "2014-11-27T18:51:14.187Z" 'error from lcovParse: ' 'Failed to parse st ring' [error] "2014-11-27T18:51:14.187Z" 'input: ' '' [error] "2014-11-27T18:51:14.187Z" 'error from convertLcovToCoveralls'

Failed to submit 'reports/lcov.info' to coveralls: Failed to parse string WARNING: Failed to submit coverage results to coveralls

Done, without errors.

kalyan542 commented 9 years ago

I can able to solve my issue.Thanks for providing this project as an example.This project helps a lot

kalyan542 commented 9 years ago

Hi,

I am getting the below error while running "Running "coveralls:main" (coveralls)" task.please help me.

        Five Zero Zero
      </h1>
      <div class="alert alert-error">
        <h3>It's Gone Pear Shaped</h3>
        <p>There has been a hiccup, the revolution will continue after we

stamp out the refusniks. You could also try refreshing or returning to the home page.

    </div>
  </div>
</div>

<footer class="footer">
  <div class="pad">
    <a href="/info/legal">Legal &amp; Privacy</a>
    &middot;
    <a href="https://github.com/lemurheavy/coveralls-public/issues">Open

· FEEDBACK or THOUGHTS · BLOG

© 2013 Lemur Heavy Industries

  </div>
</footer>

WARNING: Failed to submit coverage results to coveralls

Done, without errors.

r3b commented 9 years ago

Apologies for the slow response. It looks like Coveralls.io may have been having an issue with ther service. This isn't a credentials error and I am currently able to connect and submit without issue. Have you been able to try again?