Search code examples
jenkinsprotractorcruisecontrol.netgulp-protractor

protractor integration with jenkins


I need some help in integrating protractor code with Jenkins. I am new to Jenkins so i am not sure if Jenkins or Cruise Control is right as currently we have builds in Cruise Control but we are okay to migrate to Jenkins if that is better. Can someone please help me with any tutorials to link my protractor task with Jenkins or Cruise Control? Currently we are using Gulp as a wrapper over Javascript code for execution. We are running it with command Gulp test --site folder name Should i just specify this command in Execute shell script option of Jenkins?


Solution

  • Yes, running Protractor tests from any CI tool is not complicated

    Step 1:Just configure your cruise control/Jenkins job with "Execute Shell" as build step Step 2: Depending on your choice of running tests .. create a bat file

    echo Protractor Execution
    Protractor protractor.conf.js // In case running with protractor
    npm run --e2etests // In case running with npm run config in package.json
    Gulp test --site folder name // In your case
    echo Over and out.
    

    Step 3: Point your job build step to trigger the batch file