I have written an automation test script using Selenium WebDriver which will open up a browser and navigate to a site and then close the browser.
This is a Maven Project and since I use Eclipse, I am able to execute the project with 'Run As' -> 'Maven Test' and the project gets executed and the Build is Success in console.
But when I try to execute this same project through Jenkins, Jenkins cannot start the chromedriver.
Below is the console output:
Started by user QA Admin
Building in workspace /var/lib/jenkins/workspace/WebDriverTest2
Parsing POMs
Modules changed, recalculating dependency graph
Established TCP socket on 42178
[WebdriverTest] $ java -Xms1024m -Xmx4096m -XX:PermSize=1024m -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.7.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/boot/plexus-classworlds-2.5.2.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/conf/logging jenkins.maven3.agent.Maven32Main /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven /var/cache/jenkins/war/WEB-INF/lib/remoting-2.60.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.7.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.7.jar 42178
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=1024m; support was removed in 8.0
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /home/admin/workspace/WebdriverTest/pom.xml test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building WebdriverTest 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # WebdriverTest ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) # WebdriverTest ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # WebdriverTest ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) # WebdriverTest ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) # WebdriverTest ---
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Starting ChromeDriver 2.23.409687 (c46e862757edc04c06b1bd88724d15a5807b84d1) on port 13012
Only local connections are allowed.
Tests run: 3, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 61.125 sec <<< FAILURE! - in TestSuite
beforeTest(example.NewTest) Time elapsed: 61.027 sec <<< FAILURE!
org.openqa.selenium.WebDriverException:
unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.23.409687 (c46e862757edc04c06b1bd88724d15a5807b84d1),platform=Linux 3.16.0-77-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.22 seconds
Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
System info: host: 'AZDTPDE-L2', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.16.0-77-generic', java.version: '1.8.0_101'
Driver info: org.openqa.selenium.chrome.ChromeDriver
at example.NewTest.beforeTest(NewTest.java:31)
Results :
Failed tests:
NewTest.beforeTest:31 » WebDriver unknown error: Chrome failed to start: exite...
Tests run: 3, Failures: 1, Errors: 0, Skipped: 2
[ERROR] There are test failures.
Please refer to /home/admin/workspace/WebdriverTest/target/surefire-reports for the individual test results.
[JENKINS] Recording test results
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:07 min
[INFO] Finished at: 2016-08-26T12:09:35+05:30
[INFO] Final Memory: 28M/1059M
[INFO] ------------------------------------------------------------------------
[JENKINS] Archiving /home/admin/workspace/WebdriverTest/pom.xml to WebdriverTest/WebdriverTest/0.0.1-SNAPSHOT/WebdriverTest-0.0.1-SNAPSHOT.pom
/home/admin/workspace/WebdriverTest/pom.xml is not inside /var/lib/jenkins/workspace/WebDriverTest2/home/admin/workspace/WebdriverTest/; will archive in a separate pass
channel stopped
Finished: UNSTABLE
I'm using Ubuntu 14.04 OS.
Any help is greatly appreciated. Thanks in advance. Please help. Any help?
Related
Title is pretty self explanatory, I've downloaded the non-modular maven sample code for JavaFX from OpenJFX (from here) and I can't run it.
It compiles without any error but when I try to run it I get this error
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< org.openjfx:hellofx >-------------------------
[INFO] Building hellofx 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> javafx-maven-plugin:0.0.6:run (default-cli) > process-classes # hellofx >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # hellofx ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # hellofx ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< javafx-maven-plugin:0.0.6:run (default-cli) < process-classes # hellofx <<<
[INFO]
[INFO]
[INFO] --- javafx-maven-plugin:0.0.6:run (default-cli) # hellofx ---
[INFO] Toolchain in javafx-maven-plugin null
[ERROR] Command execution failed.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.691 s
[INFO] Finished at: 2022-12-07T08:56:47+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.6:run (default-cli) on project hellofx: Error: Command execution failed. Cannot run program "java" (in directory "/home/johan/Desktop/hellofx"): error=2, No such file or directory -> [Help 1]
Any idea is appreciated as I don't even understand the Cannot run program Java part.
I ran the javafx:compile then the javafx:run in Maven.
Ensure your JAVA_HOME environmental variable is set correctly. This will allow the javafx-maven-plugin to find the correct java command needed to run your application.
Follow this guide, choosing the relevant section for your OS:
Set JAVA_HOME on Windows 7, 8, 10, Mac OS X, Linux
Also, use the current version of the maven JavaFX plugin, 0.0.8, though that is not your core issue.
I am using Jenkins and applying the window batch command to execute, my build is successful but somehow it is not opening the chrome browser to execute my script, i am sharing my console output and it says its successful not sure where the problem, i have applied all the required plugins and other important code in pom file , will appreciate any help
Started by user admin
Running as SYSTEM
Building in workspace C:\ProgramData\Jenkins\.jenkins\workspace\TestProject1
[TestProject1] $ cmd /c call C:\Users\WRP\AppData\Local\Temp\jenkins17301363669897190864.bat
C:\ProgramData\Jenkins\.jenkins\workspace\TestProject1>c:
C:\ProgramData\Jenkins\.jenkins\workspace\TestProject1>cd C:\Users\WRP\eclipse-workspace\PracticeProject
C:\Users\WRP\eclipse-workspace\PracticeProject>mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.NewPractice.org:PracticeProject >-----------------
[INFO] Building PracticeProject 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # PracticeProject ---
[INFO] Deleting C:\Users\WRP\eclipse-workspace\PracticeProject\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # PracticeProject ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # PracticeProject ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # PracticeProject ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # PracticeProject ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 4 source files to C:\Users\WRP\eclipse-workspace\PracticeProject\target\test-classes
[WARNING] /C:/Users/WRP/eclipse-workspace/PracticeProject/src/test/java/First_Test/Practice_Arabic.java:[64,77] unmappable character (0x8F) for encoding windows-1252
[WARNING] /C:/Users/WRP/eclipse-workspace/PracticeProject/src/test/java/First_Test/Practice_Arabic.java:[76,76] unmappable character (0x81) for encoding windows-1252
[WARNING] /C:/Users/WRP/eclipse-workspace/PracticeProject/src/test/java/First_Test/Practice_Arabic.java:[93,78] unmappable character (0x81) for encoding windows-1252
[WARNING] /C:/Users/WRP/eclipse-workspace/PracticeProject/src/test/java/First_Test/Practice_Arabic.java:[132,96] unmappable character (0x81) for encoding windows-1252
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M7:test (default-test) # PracticeProject ---
[INFO] Using auto detected provider org.apache.maven.surefire.testng.TestNGProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Starting ChromeDriver 103.0.5060.53 (a1711811edd74ff1cf2150f36ffa3b0dae40b17f-refs/branch-heads/5060#{#853}) on port 55115
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Jul 06, 2022 11:05:45 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected upstream dialect: W3C
Jul 06, 2022 11:05:45 AM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
INFO: Found exact CDP implementation for version 103
Test was executed
Jul 06, 2022 11:06:49 AM org.openqa.selenium.remote.http.WebSocket$Listener onError
WARNING: Connection reset
java.net.SocketException: Connection reset
at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394)
at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426)
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:258)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 68.373 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:20 min
[INFO] Finished at: 2022-07-06T11:06:50+05:00
[INFO] ------------------------------------------------------------------------
Finished: SUCCESS
So I've been trying to run my Selenium tests using Jenkins.
I created a Maven project, and set the correct POM.xlm pathfile (At least it's what I'm almost certain)
And I continue to get an error at parsing the POM file saying the file is not present in the file path.
The project does work if maven run it from console or eclipse ide.
Here's the stacktrace of the error given by Jenknins.
Building in workspace /Users/Shared/Jenkins/Home/workspace/Pagode
Parsing POMs
Discovered a new module com.hugomonteiro:PagodeAutomatedTests PagodeAutomatedTests
Modules changed, recalculating dependency graph
Established TCP socket on 50661
[PagodeAutomatedTests] $ /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/java -cp /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.12-alpha-1.jar:/usr/local/Cellar/maven/3.5.4/libexec/boot/plexus-classworlds-2.5.2.jar:/usr/local/Cellar/maven/3.5.4/libexec/conf/logging jenkins.maven3.agent.Maven35Main /usr/local/Cellar/maven/3.5.4/libexec /Users/Shared/Jenkins/Home/war/WEB-INF/lib/remoting-3.25.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.12-alpha-1.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.12-alpha-1.jar 50661
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml test
[INFO] Scanning for projects...
[HUDSON] Collecting dependencies info
[INFO]
[INFO] ---------------< com.hugomonteiro:PagodeAutomatedTests >----------------
[INFO] Building PagodeAutomatedTests 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.beust:jcommander:jar:1.66 is missing, no dependency information available
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # PagodeAutomatedTests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # PagodeAutomatedTests ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # PagodeAutomatedTests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # PagodeAutomatedTests ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # PagodeAutomatedTests ---
[INFO] Surefire report directory: /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Starting ChromeDriver 2.42.591059 (a3d9684d10d61aa0c45f6723b327283be1ebaad8) on port 21561
Only local connections are allowed.
Oct 12, 2018 5:26:39 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 15.043 sec <<< FAILURE! - in TestSuite
doLoginTest(testcases.LoginTest) Time elapsed: 10.681 sec <<< FAILURE!
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of [[ChromeDriver: chrome on MAC (6cf1ac936bdb4be38c29d55651ee5c6b)] -> css selector: [class='fa fa-fw fa-caret-down']] (tried for 10 second(s) with 500 milliseconds interval)
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'Hugos-MacBook-Pro.local', ip: 'fe80:0:0:0:858:ef39:e614:659a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_181'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.42.591059 (a3d9684d10d61a..., userDataDir: /var/folders/9l/55xyqdlx7gl...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:50670}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 69.0.3497.100, webStorageEnabled: true}
Session ID: 6cf1ac936bdb4be38c29d55651ee5c6b
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:113)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:283)
at pages.actions.LoginActions.selectLanguage(LoginActions.java:40)
at pages.actions.LoginActions.doLogin(LoginActions.java:26)
at testcases.LoginTest.doLoginTest(LoginTest.java:21)
Results :
Failed tests:
LoginTest.doLoginTest:21 » Timeout Expected condition failed: waiting for visi...
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[JENKINS] Recording test results
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.SurefireArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class org.jfrog.hudson.maven2.MavenDependenciesRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.760 s
[INFO] Finished at: 2018-10-12T17:26:54+01:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project PagodeAutomatedTests: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[JENKINS] Archiving /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml to com.hugomonteiro/PagodeAutomatedTests/0.0.1-SNAPSHOT/PagodeAutomatedTests-0.0.1-SNAPSHOT.pom
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
/Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml is not inside /Users/Shared/Jenkins/Home/workspace/Pagode/Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/; will archive in a separate pass
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
ERROR: Failed to parse POMs
java.nio.file.NoSuchFileException: /Users/Shared/Jenkins/Home/workspace/Pagode/Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
at java.nio.file.Files.newByteChannel(Files.java:361)
at java.nio.file.Files.newByteChannel(Files.java:407)
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
at java.nio.file.Files.newInputStream(Files.java:152)
at hudson.FilePath.read(FilePath.java:1973)
at jenkins.plugins.maveninfo.extractor.properties.PomPropertiesFinder.findProperties(PomPropertiesFinder.java:50)
at jenkins.plugins.maveninfo.extractor.MavenInfoExtractor.extract(MavenInfoExtractor.java:58)
at jenkins.plugins.maveninfo.extractor.MavenInfoEnvironment.tearDown(MavenInfoEnvironment.java:42)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:908)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1819)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
channel stopped
Finished: FAILURE
Any help would be excelent.
Thanks in advance !
Ok so the problem was :
I was hardcoding the pom file from the eclipse workspace directly to the Jenkins pom file path and this is wrong.
How I fixed with chrylis help :
Moved the project folder to the Jenkins workspace and gave the path from that directory and it worked just fine.
Selenium tests.
Everything perfectly works when I run tests from IDE.
But have problems to run with Jenkins.
[ERROR] Tests run: 12, Failures: 1, Errors: 0, Skipped: 11, Time elapsed: 66.516 s <<< FAILURE! - in TestSuite
[ERROR] beforeClass(TestsSignUpPage.RequiredFields) Time elapsed: 66.136 s <<< FAILURE!
org.openqa.selenium.WebDriverException:
connection refused
Can you help me?
Have same problem with running firefox or chrome driver.
Here is Console Output:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for Gmail:gmail:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.codehaus.groovy:groovy:jar -> duplicate declaration of version 1.8.3 # line 63, column 21
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.codehaus.groovy:groovy:jar -> duplicate declaration of version 1.8.3 # line 68, column 21
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.codehaus.groovy:groovy:jar -> duplicate declaration of version 1.8.3 # line 73, column 21
[WARNING] 'dependencies.dependency.version' for org.testng:testng:jar is either LATEST or RELEASE (both of them are being deprecated) # line 82, column 22
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ----------------------------< Gmail:gmail >-----------------------------
[INFO] Building gmail 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.pom (32 kB at 27 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7.pom (632 B at 8.2 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/asm/asm/3.2/asm-3.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/asm/asm/3.2/asm-3.2.pom (264 B at 3.6 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/asm/asm-parent/3.2/asm-parent-3.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/asm/asm-parent/3.2/asm-parent-3.2.pom (4.4 kB at 48 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/asm/asm-commons/3.2/asm-commons-3.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/asm/asm-commons/3.2/asm-commons-3.2.pom (415 B at 5.8 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/asm/asm-tree/3.2/asm-tree-3.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/asm/asm-tree/3.2/asm-tree-3.2.pom (404 B at 5.3 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/asm/asm-util/3.2/asm-util-3.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/asm/asm-util/3.2/asm-util-3.2.pom (409 B at 5.3 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/asm/asm-analysis/3.2/asm-analysis-3.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/asm/asm-analysis/3.2/asm-analysis-3.2.pom (417 B at 5.1 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/asm/asm/3.2/asm-3.2.jar
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/asm/asm-commons/3.2/asm-commons-3.2.jar
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7.jar
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/asm/asm-util/3.2/asm-util-3.2.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/asm/asm-commons/3.2/asm-commons-3.2.jar (33 kB at 71 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/asm/asm-analysis/3.2/asm-analysis-3.2.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/asm/asm-util/3.2/asm-util-3.2.jar (37 kB at 76 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/asm/asm-tree/3.2/asm-tree-3.2.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/asm/asm/3.2/asm-3.2.jar (43 kB at 85 kB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/asm/asm-tree/3.2/asm-tree-3.2.jar (22 kB at 36 kB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/asm/asm-analysis/3.2/asm-analysis-3.2.jar (18 kB at 30 kB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7.jar (445 kB at 272 kB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar (5.5 MB at 253 kB/s)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # gmail ---
[INFO] Deleting /Users/Shared/Jenkins/Home/workspace/GmailGitHub/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # gmail ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/Shared/Jenkins/Home/workspace/GmailGitHub/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # gmail ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 3 source files to /Users/Shared/Jenkins/Home/workspace/GmailGitHub/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # gmail ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/Shared/Jenkins/Home/workspace/GmailGitHub/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # gmail ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 3 source files to /Users/Shared/Jenkins/Home/workspace/GmailGitHub/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) # gmail ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
1521659923546 geckodriver INFO geckodriver 0.19.1
1521659923561 geckodriver INFO Listening on 127.0.0.1:37123
1521659925609 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-profile" "/var/folders/55/cb16fw2903l_bbx9l9vx_9d800007q/T/rust_mozprofile.Y4QTxY9GXv22"
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
1521659927038 Marionette INFO Enabled via --marionette
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
2018-03-21 12:18:49.139 plugin-container[808:114493] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8247, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
2018-03-21 12:18:50.674 plugin-container[811:114806] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8023, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2018-03-21 12:18:54.095 plugin-container[808:114493] In -[NSApplication(NSQuietSafeQuit) _updateCanQuitQuietlyAndSafely], _LSSetApplicationInformationItem(NSCanQuitQuietlyAndSafely) returned error -600
[ERROR] Tests run: 12, Failures: 1, Errors: 0, Skipped: 11, Time elapsed: 66.516 s <<< FAILURE! - in TestSuite
[ERROR] beforeClass(TestsSignUpPage.RequiredFields) Time elapsed: 66.136 s <<< FAILURE!
org.openqa.selenium.WebDriverException:
connection refused
Build info: version: '3.10.0', revision: '176b4a9', time: '2018-03-02T19:03:16.397Z'
System info: host: 'Auznali.internet.sony.tv', ip: 'fe80:0:0:0:2acf:e9ff:fe50:9c01%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_162'
Driver info: driver.version: FirefoxDriver
remote stacktrace: stack backtrace:
0: 0x10583749e - backtrace::backtrace::trace::h3ab5720c483fe461
1: 0x1058374dc - backtrace::capture::Backtrace::new::h096accf58447e0d5
2: 0x105770534 - webdriver::error::WebDriverError::new::hc0958d01acda7bfc
3: 0x105777300 - geckodriver::marionette::MarionetteHandler::create_connection::h59a68c8dfef48e54
4: 0x105756d3c - _$LT$webdriver..server..Dispatcher$LT$T$C$$u20$U$GT$$GT$::run::h5a26ba0bb4fdb139
5: 0x10572f0c5 - std::sys_common::backtrace::__rust_begin_short_backtrace::h3f868f7a1a12bdcc
6: 0x105739d2d - std::panicking::try::do_call::hfce1ad2a948c3632
7: 0x1058e3a5c - __rust_maybe_catch_panic
8: 0x10574ceb5 - _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::h651dedb755194a8c
9: 0x1058dfc4b - std::sys::imp::thread::Thread::new::thread_start::h48c72bb09587cbc3
10: 0x7fff89e4e059 - _pthread_body
11: 0x7fff89e4dfd6 - _pthread_start
at TestsSignUpPage.RequiredFields.beforeClass(RequiredFields.java:49)
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] RequiredFields.beforeClass:49 » WebDriver connection refused
Build info: versi...
[INFO]
[ERROR] Tests run: 12, Failures: 1, Errors: 0, Skipped: 11
[INFO]
[ERROR] There are test failures.
Please refer to /Users/Shared/Jenkins/Home/workspace/GmailGitHub/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # gmail ---
[INFO] Building jar: /Users/Shared/Jenkins/Home/workspace/GmailGitHub/target/gmail-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:42 min
[INFO] Finished at: 2018-03-21T12:19:53-07:00
[INFO] ------------------------------------------------------------------------
Ожидаю пока Jenkins закончит сбор данных
[JENKINS] Archiving /Users/Shared/Jenkins/Home/workspace/GmailGitHub/pom.xml to Gmail/gmail/1.0-SNAPSHOT/gmail-1.0-SNAPSHOT.pom
[JENKINS] Archiving /Users/Shared/Jenkins/Home/workspace/GmailGitHub/target/gmail-1.0-SNAPSHOT.jar to Gmail/gmail/1.0-SNAPSHOT/gmail-1.0-SNAPSHOT.jar
channel stopped
Finished: UNSTABLE
Let me know if you need addition information
I got solution: https://medium.com/#ved.pandey/setting-up-jenkins-on-mac-osx-50d8fe16df9f
Jenkins created new user.
Need to give that user admin rights, change pass, login as that user.
i am trying to learn open source project on GitHub. its multi-module project and for that, I can execute mvn clean install successfully.but the problem is when I go to deploy using mvn wildfly:deploy -DskipTests=true it gives errors below.so how can I setup this type of project locally and please help how to successfully deploy it on wildfly errors below--->
$mvn wildfly:deploy -DskipTests=true
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building hibernate-ogm-hiking-demo 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> wildfly-maven-plugin:1.0.1.Final:deploy (default-cli) > package # hibernate-ogm-hiking-demo >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # hibernate-ogm-hiking-demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # hibernate-ogm-hiking-demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # hibernate-ogm-hiking-demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # hibernate-ogm-hiking-demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # hibernate-ogm-hiking-demo ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.4:war (default-war) # hibernate-ogm-hiking-demo ---
[INFO] Packaging webapp
[INFO] Assembling webapp [hibernate-ogm-hiking-demo] in [/media/yogesh/68BFB7DA4E8F9CBB/TEMP/hibernate-demos-master/hibernate-ogm/hiking-demo/target/hibernate-ogm-hiking-demo-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/media/yogesh/68BFB7DA4E8F9CBB/TEMP/hibernate-demos-master/hibernate-ogm/hiking-demo/src/main/webapp]
[INFO] Webapp assembled in [109 msecs]
[INFO] Building war: /media/yogesh/68BFB7DA4E8F9CBB/TEMP/hibernate-demos-master/hibernate-ogm/hiking-demo/target/hibernate-ogm-hiking-demo-1.0-SNAPSHOT.war
[INFO]
[INFO] <<< wildfly-maven-plugin:1.0.1.Final:deploy (default-cli) < package # hibernate-ogm-hiking-demo <<<
[INFO]
[INFO] --- wildfly-maven-plugin:1.0.1.Final:deploy (default-cli) # hibernate-ogm-hiking-demo ---
Sep 16, 2016 12:21:47 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.2.0.Final
Sep 16, 2016 12:21:47 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.2.0.Final
Sep 16, 2016 12:21:47 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 4.0.0.Final
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.268 s
[INFO] Finished at: 2016-09-16T12:21:53+05:30
[INFO] Final Memory: 27M/341M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.1.Final:deploy (default-cli) on project hibernate-ogm-hiking-demo: Could not execute goal deploy on /media/yogesh/68BFB7DA4E8F9CBB/TEMP/hibernate-demos-master/hibernate-ogm/hiking-demo/target/hibernate-ogm-hiking-demo-1.0-SNAPSHOT.war. Reason: I/O Error could not execute operation '{
[ERROR] "operation" => "read-attribute",
[ERROR] "address" => [],
[ERROR] "name" => "launch-type"
[ERROR] }': java.net.ConnectException: JBAS012144: Could not connect to http-remoting://127.0.0.1:9990. The connection timed out
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
if I try to run using `mvn jboss-as:deploy -DskipTests=true the same errors.
The wilfdly:deploy target is deploying the artifact to a running Wildfly. In you case there is no running Wildfly.
You can use the wildfly:run target to start Wildfly and deploy your artifact.
Reference: https://docs.jboss.org/wildfly/plugins/maven/latest/usage.html