javascriptangularjsjenkinsprotractor

Only able to run Protractor Test partially via jenkins


I have created a tern project to run protractor test in eclipse.when i call

C:\Users\***>protractor D:\eclipseProject\sample.js

above line in cmd, protractor is running perfectly.But problem here is that for each run i have to open a cmd window and type above line every time so i create a batch file sampleOne.bat for the same and it's working very fine.Now what next i am doing is that i am calling this sampleOne.bat file in jenkins and click on Build Now (option in jenkins).jenkins is able to run this batch file but partially (suppose if sample.js does login on a angular web app and then verifies the next page.)i.e it enters the username and password in the edit fields and after that browser get closed (Chrome Browser) and jenkins show below msg

Started by user anonymous
Building in workspace D:\eclipseProject\***WebApplication\***BatchRunner
[***BatchRunner] $ cmd /c call C:\Users\***\AppData\Local\Temp\hudson4990564856015457437.bat

D:\eclipseProject\***WebApplication\***BatchRunner>sampleOne.bat
Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information
Finished: SUCCESS

Not sure is this a right way or not Please help


Solution

  • After doing a serious research i found something that is working as per the above after going through several links i found these links

    as per these links in order to work i have to set BUILD_ID = dontKillMe So in jenkins i did this and its working now

    1. Open jenkins.war from cmd.
    2. Click Manage Jenkins.
    3. Click Configure System (first option).
    4. Under Global properties check Environment variables.Click add button
    5. Give List of key-value pairs Name = BUILD_ID and value = dontKillMe.
    6. Click apply and save.
    7. Run the project now (working in my case)