Transcavator and Selenium at Gulp and Jenkins

I am very confused about how to tell Transporter and Selen from where I can apply for integration tests (Gulp runs on Jenkins).

This is my protractor configuration:

exports.config = { seleniumServerJar: '../node_modules/protractor/selenium/selenium-server-standalone-2.44.0.jar', multiCapabilities: [{ browserName: 'chrome' }], baseUrl: 'http://127.0.0.1:9000/', rootElement: 'html', jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000 } }; 

But here is the problem: http://127.0.0.1:9000 does not exist. Should I deploy first and then do integration tests or do it before deployment? Because, if the deployment should be performed in the first place, then it makes no sense to me where to put it in the build system. Because then this is not so and cannot be part of the assembly system. So where is the CI?

+5
source share
2 answers

You need to do this in a few steps / tasks with gulp :

  • start the selenium server (if you are using a local selenium server)
  • start the web server, see gulp-webserver (you lacked this step)
  • check translators
  • shutting down the web server
  • shutdown selenium server
+6
source

A fully working example of such a configuration can be found in the angular -seed project. https://github.com/angular/angular-seed

I was able to successfully use this example to use protractor tests in my GitHub project: https://github.com/atais/angular-eonasdan-datetimepicker

So you can use either to help you.


Basically the easiest way:

  • run http-server as a daemon
  • run gulp tests
  • manage everything with npm ( package.json )

The full code is available here: fooobar.com/questions/711882 / ...

0
source

Source: https://habr.com/ru/post/1208886/


All Articles