Is it possible to run selenium test cases on cloud? - maven

I am using maven to run my selenium test cases .I have taken the whole code to my digital ocean Ubuntu server ,I have installed or configured all necessary plugins like chromedriver,maven..etc .
On running the command mvn test I am getting the following error .
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Configuring TestNG with: TestNG652Configurator
Starting ChromeDriver 2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320) on port 28572
Only local connections are allowed.
May 19, 2017 4:56:16 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
May 19, 2017 4:57:17 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Configuring TestNG with: TestNG652Configurator
Tests run: 5, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 63.761 sec <<< FAILURE! - in TestSuite
invokeBrowser(datum.LoginTest) Time elapsed: 63.281 sec <<< FAILURE!
org.openqa.selenium.NoSuchSessionException: no such session
(Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 4.4.0-78-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 85 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'devopspipe', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-78-generic', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{message=unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 4.4.0-78-generic x86_64), platform=ANY}]
Session ID: 7c4d43849026d2b42c83fa6d39230969
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:635)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:658)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:882)
at datum.UtilsMethods.browserInvoke(UtilsMethods.java:99)
at datum.LoginTest.invokeBrowser(LoginTest.java:20)
Results :
Failed tests:
LoginTest.invokeBrowser:20 ยป NoSuchSession no such session
(Driver info: chr...
Tests run: 5, Failures: 1, Errors: 0, Skipped: 3
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:10 min
[INFO] Finished at: 2017-05-19T04:57:18+00:00
[INFO] Final Memory: 20M/48M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project DataVisualisation: There are test failures.
[ERROR]
[ERROR] Please refer to /home/sample-selenium-datum/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.
[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/MojoFailureException
If there is any other way of running the test cases on cloud please suggest and if I need to provide any other information let me know .
My browser invocation code :
else if(browserName.equals("chrome")) {
System.setProperty("webdriver.chrome.driver", "/home/arima/chromeDriver/chromedriver");
//System.setProperty("webdriver.chrome.driver", "/home/selenium-drivers/chromedriver");
capability = DesiredCapabilities.chrome();
driver = new org.openqa.selenium.chrome.ChromeDriver(capability);
driver.manage().window().maximize();
driver.get(url);
}

Related

neo4j spark connector: mvn clean install assembly:single error

I am working on neo4j-spark connector. After cloning and moving to the directory, I did mvn clean install assembly:single. It throws error :
Tests in error:
runMatrixQueryDFSchema(org.neo4j.spark.Neo4jDataFrameTest): Job aborted due to stage failure: Task 0 in stage 3.0 failed 1 times, most recent failure: Lost task 0.0 in stage 3.0 (TID 12, localhost): java.util.NoSuchElementException: None.get
Tests run: 7, Failures: 0, Errors: 1, Skipped: 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42.538s
[INFO] Finished at: Wed Aug 24 19:18:07 IST 2016
[INFO] Final Memory: 72M/1016M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project neo4j-spark-connector: There are test failures.
[ERROR]
[ERROR] Please refer to /data/neo4j-spark-connector/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.
[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/MojoFailureException
How do I get rid of it? Do I need to do anything else to build target/neo4j-spark-connector_2.11-full-2.0.0-M1.jar for Scala 2.11. I have installed Spark 2.0.0 installed. I have it saved in the directory same as that for neo4j-spark-connector. Do I need to save it somewhere else? How do I get it to work?
This issue has been resolved now. You can take latest pull from the neo4j-spark-connector repository and get it to work.
Thanks.

Wildfly command line deploy failure

I am able to run most of these tutorials in Eclipse provided in the Wildfly quickstart here:
https://github.com/wildfly/quickstart/
However, I am running into problem when I use command line to do the deployment. For the most basic HelloWorld tutorial, I received this message:
mvn clean install
is successful. However, the deployment fails:
mvn clean install wildfly:deploy
Error messages:
ackaging webapp
[INFO] Assembling webapp [wildfly-helloworld] in [/home/abigail/study/quickstart/helloworld/target/wildfly-helloworld]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/abigail/study/quickstart/helloworld/src/main/webapp]
[INFO] Webapp assembled in [2 msecs]
[INFO] Building war: /home/abigail/study/quickstart/helloworld/target/wildfly-helloworld.war
[INFO]
[INFO] <<< wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) < package # wildfly-helloworld <<<
[INFO]
[INFO] --- wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) # wildfly-helloworld ---
Dec 19, 2015 11:42:10 PM org.xnio.Xnio
INFO: XNIO version 3.2.2.Final
Dec 19, 2015 11:42:10 PM org.xnio.nio.NioXnio
INFO: XNIO NIO Implementation Version 3.2.2.Final
Dec 19, 2015 11:42:10 PM org.jboss.remoting3.EndpointImpl
INFO: JBoss Remoting version 4.0.3.Final
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.836 s
[INFO] Finished at: 2015-12-19T23:42:15-05:00
[INFO] Final Memory: 21M/162M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) on project wildfly-helloworld: Could not execute goal deploy on /home/abigail/study/quickstart/helloworld/target/wildfly-helloworld.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
You have to check if you created a user for the deployment.See this article where it is further explained .
I had same problem when the other application is usind default 9990 port.
I moved wildfly to the port 9991 (modifying standalone.xml and host.xml), admin console started to work, but deploy still was failed.
Then I figured out that wildfly plugin uses same 9990 by default.
I handled this by modiying pom.xml of my progect, put the other port (the same I was using in standalone) to the configuration of wildfly plugin.
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.wildfly.maven.plugin}</version>
<configuration>
<port>9991</port>
</configuration>
</plugin>

What's cause of below Maven exception occuring in Jenkins Build?

What's cause of below Maven exception occuring in Jenkins Build?
It was working initially for versio 3.0.2 - someone accidentally replaced 3.2.3 - we started seeing this error.
3.0.2 was reinstated
Used commands mvn -U clean install
Doesnt seem to work.. any pointers appreciated.
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.6.1/maven-clean-plugin-2.6.1.pom
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.526 s
[INFO] Finished at: 2015-03-25T15:17:44-04:00
[INFO] Final Memory: 4M/11M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.6.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.6.1: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.6.1 from/to central (https://repo.maven.apache.org/maven2): java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory -> [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/PluginResolutionException
SOE Failed. ( goto :FailResult )
Checking whether SOE.war is built successfully and available.
"Building BatchFeed in Dev Environment...."
The Command: D:\apache-maven-3.0.4\bin\mvn.bat -U clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building feed 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.034 s
[INFO] Finished at: 2015-03-25T15:17:48-04:00
[INFO] Final Memory: 5M/11M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory -> [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/PluginResolutionException
The error message looks like a network problem (proxy/firewall) whatever as Manfred already mentioned. May be you have wrongly configured your repositories (settings.xml) (you don't seemed to be using a repository manager).
could not be resolved: Failed to read artifact descriptor for
org.apache.maven.plugins:maven-clean-plugin:jar:2.6.1: Could not
transfer artifact
org.apache.maven.plugins:maven-clean-plugin:pom:2.6.1 from/to central
(https://repo.maven.apache.org/maven2):
java.lang.ClassNotFoundException: Cannot find the specified class
com.ibm.websphere.ssl.protocol.SSLSocketFactory -> [Help 1]
I can also recommend to upgrade to at least 3.0.5 to be on a stable version better to higher versions.
Adding to what other says about network issue which could be the problem here.
I see I/O exception here.
INFO: I/O exception
Please check your disk as well if it is full or having some problem or permission issue.

Failed to execute goal net.kindleit:maven-gae-plugin:0.9.2:unpack due to API Incomatibility

I'm new to Spring Roo as well as Maven. I was trying to setup a basic Google App Engine web application using Spring Roo. But when I run the tests - perform tests/mvn test - I get an error saying unable to run the goal Unpack due to API incomatibility.
Details:
gae.version: 1.6.1
gae-runtime: 0.9.2
Tried the same with 1.6.0 and 0.9.0 - still gives me the same error.
Exception:
[INFO] --- maven-gae-plugin:0.9.2:unpack (default) # project_x ---
Feb 8, 2012 2:47:40 PM org.sonatype.guice.bean.reflect.Logs$JULSink warn
WARNING: Error injecting: net.kindleit.gae.UnpackGoal
java.lang.TypeNotPresentException: Type net.kindleit.gae.UnpackGoal not present
at org.sonatype.guice.bean.reflect.URLClassSpace.loadClass(URLClassSpace.java:109)
at org.sonatype.guice.bean.reflect.NamedClass.load(NamedClass.java:45)
...
...
... 41 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.836s
[INFO] Finished at: Wed Feb 08 14:47:40 IST 2012
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.kindleit:maven-gae-plugin:0.9.2:unpack (default) on project project_x: Execution default of goal net.kindleit:maven-gae-plugin:0.9.2:unpack failed: Unable to load the mojo 'unpack' in the plugin 'net.kindleit:maven-gae-plugin:0.9.2' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Bad version number in .class file
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>net.kindleit:maven-gae-plugin:0.9.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/myself/.m2/repository/net/kindleit/maven-gae-plugin/0.9.2/maven-gae-plugin-0.9.2.jar
[ERROR] urls[1] = file:/Users/myself/.m2/repository/net/kindleit/gae-runtime/1.6.1/gae-runtime-1.6.1.pom
...
..
I tried googling this issue, but didn't come across anyone facing this issue. I guess, I'm missing some dependency in the generated POM - but due to my inexperience I'm not able to figure out the exact cause.
Let me know, if I need to upload the generated pom.xml or any other details.
meanwhile, I'll continue to figure out what is causing the issue.
Thanks in advance.
Looks like an API incompatibility:
due to an API incompatibility:
org.codehaus.plexus.component.repository.exception.ComponentLookupException:
Bad version number in .class file

Sonar - CSharp Plugins Ecosystem - Can not execute Sonar: Error while trying to get the next element name

Sonar CSharp Plugins Ecosystem is throwing error at the end of processing.
I have checked the coverage-report.xml and it only include one line.
<PartCoverReport version="4.0" date="2011-08-10T10:09:12.1721003+08:00" />
I think this is the possible reason for the error.
How can I fix this issue? Is this a configuration issue?
Thanks in advance.
Please see piece of error message below:
...
[INFO] Sensor org.sonar.plugins.csharp.fxcop.FxCopSensor#e6529c...
[INFO] Microsoft (R) FxCop Command-Line Tool, Version 10.0 (10.0.30319.1) X86
[INFO] Copyright (C) Microsoft Corporation, All Rights Reserved.
[INFO]
[INFO] Loading C:\JanusPilot\SonarDotnetExample\Example.Application\target\sonar \sonar.FxCop...
[INFO] Loaded DesignRules.dll...
[INFO] Loaded GlobalizationRules.dll...
[INFO] Loaded NamingRules.dll...
[INFO] Loaded PerformanceRules.dll...
[INFO] Loaded Example.Application.exe...
[INFO] Initializing Introspection engine...
[INFO] Analyzing...
[INFO] Analysis Complete.
[INFO] Writing 1 messages...
[INFO] Writing report to C:\JanusPilot\SonarDotnetExample\Example.Application\t
arget\sonar\fxcop-report.xml...
[INFO] Done:00:00:01.1050632
[INFO] Sensor org.sonar.plugins.csharp.fxcop.FxCopSensor#e6529c done: 2342 ms
[INFO] Sensor org.sonar.plugins.csharp.gallio.CoverageReportSensor#eb73e...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:14.037s
[INFO] Finished at: Wed Aug 10 10:13:29 CST 2011
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0-beta-2:s
onar (default-cli) on project example: Can not execute Sonar: Error while trying
to get the next element name: ParseError at [row,col]:[1,75]
[ERROR] Message: Can not call 'getLocalName(): cursor does not point to a valid
node (curr event [null]; cursor state CLOSED)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I am one of the developpers of the C# plugins.
You should rather ask for help by sending a mail to the sonar user mailing list.
Your partcover reports shows that partcover did not succeed to gather coverage measures suring test execution.
You have 3 solutions :
try ncover3
skip coverage
If you need more details, again, please drop a message to the user mailing list
Regards

Resources