Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. exports.config = {
  2. // Capabilities to be passed to the webdriver instance.
  3. capabilities: {
  4. 'browserName': 'chrome'
  5. },
  6.  
  7. onPrepare: function () {
  8. var fs = require('fs');
  9. var testDir = 'testresults/';
  10. if (!fs.existsSync(testDir)) {
  11. fs.mkdirSync(testDir);
  12. }
  13.  
  14. var jasmineReporters = require('jasmine-reporters');
  15.  
  16. // returning the promise makes protractor wait for the reporter config before executing tests
  17. return browser.getProcessedConfig().then(function () {
  18. // you could use other properties here if you want, such as platform and version
  19.  
  20. var browserName = 'browser';
  21. browser.getCapabilities().then(function (caps) {
  22. browserName = caps.caps_.browserName.replace(/ /g, "_");
  23.  
  24. var junitReporter = new jasmineReporters.JUnitXmlReporter({
  25. consolidateAll: true,
  26. savePath: testDir,
  27. // this will produce distinct xml files for each capability
  28. filePrefix: 'test-protractor-' + browserName,
  29. modifySuiteName: function (generatedSuiteName) {
  30. // this will produce distinct suite names for each capability,
  31. // e.g. 'firefox.login tests' and 'chrome.login tests'
  32. return 'test-protractor-' + browserName + '.' + generatedSuiteName;
  33. }
  34. });
  35. jasmine.getEnv().addReporter(junitReporter);
  36. });
  37. });
  38. },
  39.  
  40. baseUrl: 'http://localhost:3000',
  41.  
  42. // Spec patterns are relative to the current working directory when
  43. // protractor is called.
  44. specs: [paths.e2e + '/**/*.js'],
  45.  
  46. // Options to be passed to Jasmine-node.
  47. jasmineNodeOpts: {
  48. showColors: true,
  49. defaultTimeoutInterval: 30000
  50. }
  51. };
  52.  
  53. [13:27:13] E/launcher - Error: Error
  54. at C:wsnode_modulesprotractorbuiltutil.js:55:37
  55. at _rejected (C:wsnode_modulesqq.js:844:24)
  56. at C:wsnode_modulesqq.js:870:30
  57. at Promise.when (C:wsnode_modulesqq.js:1122:31)
  58. at Promise.promise.promiseDispatch (C:wsnode_modulesqq.js:788:41)
  59. at C:wsnode_modulesqq.js:604:44
  60. at runSingle (C:wsnode_modulesqq.js:137:13)
  61. at flush (C:wsnode_modulesqq.js:125:13)
  62. at nextTickCallbackWith0Args (node.js:420:9)
  63. at process._tickCallback (node.js:349:13)
  64. [13:27:13] E/launcher - Process exited with error code 100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement