Транспортир: Получение сообщения об ошибке в файле config.js, который ранее работал в терминале - PullRequest
0 голосов
/ 05 ноября 2018

выполнение тестов на транспортире Я продолжаю получать сообщение о том, что что-то не так с моим конфигурационным файлом (который прекрасно работал 2 дня назад).

Буду признателен за помощь в исправлении этого.

  1. Что я сделал не так?
  2. Как мне это исправить?

Что нужно учитывать:

  • npm был обновлен глобально 2 дня назад (до версии 11)

  • Файл package.json был настроен правильно. Был в состоянии запустить
    тест в субботу без проблем.

просматривая логи Я думаю, что это проблема:

npm ERR! LocatorTraining@ protractor: `protractor configurations.js` 

Просматривая мой файл configurations.js, я добавил в него только HTML-репортер. Больше ничего.

var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');

exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: ['PageObjectLocator1.js'],
  capabilities: {
    browserName: 'chrome'
  },

  onPrepare: function() {
      browser.driver.manage().window().maximize(); 

      jasmine.getEnv().addReporter(
                new Jasmine2HtmlReporter({
                  savePath: 'target/screenshots'
                })
              );




  }
}

Это сообщение с терминала

[16:27:25] I/launcher - 0 instance(s) of WebDriver still running
    [16:27:25] I/launcher - chrome #01 failed 1 test(s)
    [16:27:25] I/launcher - overall: 1 failed spec(s)
    [16:27:25] E/launcher - Process exited with error code 1

    npm ERR! Darwin 17.7.0
    npm ERR! argv "/Users/jacquelinegeorge/.nvm/versions/node/v7.2.0/bin/node" "/Users/jacquelinegeorge/.nvm/versions/node/v7.2.0/bin/npm" "run" "protractor"
    npm ERR! node v7.2.0
    npm ERR! npm  v3.10.9
    npm ERR! code ELIFECYCLE
    npm ERR! LocatorTraining@ protractor: `protractor configurations.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the LocatorTraining@ protractor script 'protractor configurations.js'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the LocatorTraining package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     protractor configurations.js
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs LocatorTraining
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls LocatorTraining
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR!     /Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/npm-debug.log

Это файл package.json, который работал 2 дня назад.

{
  "name": "LocatorTraining",

  "dependencies": {

"protractor":  "^5.4.1",
"jasmine-data-provider": "^2.2.0",
"protractor-jasmine2-html-reporter":"^0.0.7"



  },


  "scripts": {
    "webdriver-update": "./node_modules/.bin/webdriver-manager update",
    "webdriver-start": "./node_modules/.bin/webdriver-manager start",
    "protractor": "./node_modules/.bin/protractor configurations.js",
    "start": "npm run webdriver-update && npm run webdriver-start"
  }

}

1 Ответ

0 голосов
/ 10 ноября 2018

Кажется, у меня сейчас проблема с запуском моих тестов в Google Chrome. Когда я запускал этот тест в FF, он работал нормально. Так что код в порядке. Поэтому я выясню, почему chrome НЕ позволяет мне запускать свои тесты.

...