I am using Selenium Webdriver(v 2.47.1) automation tool in windows operating system. I have created one automation script using Eclipse IDE and integrated script with Jenkins CI. In Jenkins I created new job with help of windows batch file. Jenkins job successfully completed. I have uploaded same set of code(contains src, lib, bin directories..) to Linux server where Jenkins CI is installed and tried to create new work using Jenkins. In Linux OS I have used shell command to build the project. Project not builded successfully.. I don't know where the actual problem is..? Please help me on this
Asked
Active
Viewed 356 times
1 Answers
0
There is few things which can effects scripts in Linux environment
1st is batch file you are using refer it to resolve it if exist in your case
http://stackoverflow.com/questions/32120102/bash-file-is-running-fine-in-windows-for-testng-but-it-is-not-working-in-linux-m
Another one is if your using chrome then you need to set chrome binary according to linux
http://chromedriver.storage.googleapis.com/index.html?path=2.16/
Hope it will help you :) If still you are facing problem then please share the error your get on terminal/Jenkins jobs section

Shubham Jain
- 16,610
- 15
- 78
- 125
-
It throws following error...java.io.FileNotFoundException: test-output/testng-results.xml (Permission denied) – Karthik Sep 07 '15 at 13:39
-
Hi, I am using Excel file as Test Data input & saving result in to same excel file.. Path of the excel file is E drive on my local machine.. But I have copied all source code files, excel files and pasted it in Linux server.. Is the Excel Path URL causing the issue..? – Karthik Sep 07 '15 at 13:53
-
you are using admin account of linux or user account. Try with admin account user in linux ... – Shubham Jain Sep 07 '15 at 13:53
-
Excel Path URL need to be changed or not? – Karthik Sep 07 '15 at 13:57
-
It's depend.. if you are using absolute path that obviously you have to change all path like same .. but if you are not using absolute path and using project directly then no need – Shubham Jain Sep 07 '15 at 14:02
-
[[Utils]] Error while writing to /home/probe7qa/probe7qa.svn/icoreemrtests/onc2014/170.314.a.9/src/eNotes/test-output/Suite/Test.html: /home/probe7qa/probe7qa.svn/icoreemrtests/onc2014/170.314.a.9/src/eNotes/test-output/Suite/Test.html (Permission denied) above error occured – Karthik Sep 08 '15 at 06:56
-
maybe it's a read-write permission issue in your Linux.. check whether your excel have the write permission. Hey!! Are you using the same location/partition of your project which was located in windows? .. If Yes then Linux can't write on windows FAT or NTFS partition.. You must have to copy your project in Linux directory such as HOME – Shubham Jain Sep 08 '15 at 07:12
-
I have uploaded total Project directory generated by Eclipse to Linux server and changed the path according to server. – Karthik Sep 08 '15 at 07:25
-
still getting Permission Denied issue – Karthik Sep 08 '15 at 07:49
-
did you change your project path with in your batch file?? – Shubham Jain Sep 08 '15 at 07:51
-
batch file..? how to do this – Karthik Sep 08 '15 at 07:53
-
How you trigger your project to run. using batch, IDE only, maven with jenkins or batch with jenkins – Shubham Jain Sep 08 '15 at 07:56
-
batch with jenkins... java -cp ./lib/*:./bin org.testng.TestNG testng.xml – Karthik Sep 08 '15 at 07:58
-
It's looking fine to :( .... In linux we need to use bash command to run that bash file. In windows we do not need any such keyword. – Shubham Jain Sep 08 '15 at 08:04
-
I changed permission to 754.. I am getting below error Error: Could not find or load main class org.testng.TestNG Build step 'Execute shell' marked build as failure Finished: FAILURE – Karthik Sep 08 '15 at 09:19
-
Is your all class is present in bin folder. testng using classes not java src file s for execution and I never encountered with execute shell error. May it help you :- http://stackoverflow.com/questions/22814559/how-when-does-execute-shell-mark-a-build-as-failure-in-jenkins – Shubham Jain Sep 08 '15 at 09:33
-
Still it throws Permission Denied error like below "[EmailableReporter] [ERROR] Unable to create output file java.io.FileNotFoundException: test-output/emailable-report.html (Permission denied) at java.io.FileOutputStream.open(Native Method)" – Karthik Sep 08 '15 at 10:36