lundi 25 mars 2019

E2e test angular jenkins

I try to start tests e2e on linux server without gui.

Already install all required programs and now I trying make script in Jenkins6 which will start this test.

protractor.conf.js

{
    seleniumAddress: 'http://localhost:4444/wd/hub',
    specs: ['./e2e/todo-spec.js'],
    // Options to be passed to Jasmine-node.
    params: {
        host: 'http://localhost:3000'
    },
    capabilities: {
        browserName: 'chrome'
    },
    onPrepare: function() {
        // The require statement must be down here, since jasmine-reporters@1.0
        // needs jasmine to be in the global and protractor does not guarantee
        // this until inside the onPrepare function.
        var jasmineReporters = require('jasmine-reporters');
        jasmine.getEnv().addReporter(
            new jasmineReporters.JUnitXmlReporter('xmloutput', true, true)
        );
    },
    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 30000
    }
}

But I got error

+ google-chrome --version
Google Chrome 73.0.3683.86 
+ chromedriver --version
ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72)
+ webdriver-manager start --detach
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Dwebdriver.chrome.driver=/var/lib/jenkins/.nvm/versions/node/v8.11.3/lib/node_modules/protractor/node_modules/webdriver-manager/downloads/chromedriver_74.0.3729.6 -Dwebdriver.gecko.driver=null -jar  -role node -servlet org.openqa.grid.web.servlet.LifecycleServlet -registerCycle 0 -port 4444
selenium process id: 2193
+ protractor --host=https://my-site.com
enviroment: test
[16:03:28] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[16:03:28] E/driverProvider - Error code: 135
[16:03:28] E/driverProvider - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
[16:03:28] E/driverProvider - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444

Aucun commentaire:

Enregistrer un commentaire