mardi 18 décembre 2018

i'm getting Class not found in class path exception while running my git test through run.bat file in jenkins

i'm learning the executing the eclipse Automation code through Git with jenkins. while running the bat command manually it is running without any issue but running through Git.. it is giving class not found in Classpath exception.

Error log

Building in workspace C:\Users\DELL\.jenkins\workspace\JenkinsGitTest
 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git.exe config remote.origin.url https://github.com/Satish152/GitTest.git # timeout=10
Fetching upstream changes from https://github.com/Satish152/GitTest.git
 > git.exe --version # timeout=10
 > git.exe fetch --tags --progress https://github.com/Satish152/GitTest.git +refs/heads/*:refs/remotes/origin/*
 > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
 > git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
Checking out Revision 2e7f307474859cf6d5a4323cf210fbdd8a63200b (refs/remotes/origin/master)
 > git.exe config core.sparsecheckout # timeout=10
 > git.exe checkout -f 2e7f307474859cf6d5a4323cf210fbdd8a63200b
Commit message: "changes made in class name"
 > git.exe rev-list --no-walk fd6a75f2c57c49a45971fe35ec8b047910849b16 # timeout=10
[JenkinsGitTest] $ cmd /c call C:\Users\DELL\AppData\Local\Temp\jenkins1401414693910390241.bat

C:\Users\DELL\.jenkins\workspace\JenkinsGitTest>run.bat

C:\Users\DELL\.jenkins\workspace\JenkinsGitTest>set classpath=H:\workspace\GitHubTest\bin;H:\workspace\GitHubTest\lib\*; 

C:\Users\DELL\.jenkins\workspace\JenkinsGitTest>java -cp bin;lib\* org.testng.TestNG testng.xml 
[TestNG] [ERROR] 
Cannot find class in classpath: gitTest.DemoGitTest
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

i'm adding Project Jenkins Configuration screenshot.

Git project configuration in [![Git project configuration in jenkins1Jenkins]2]2

Aucun commentaire:

Enregistrer un commentaire