Maven Selenium project Execution Not visible with Jenkins build Now - maven

I am using selenium maven project with Jenkins and when I run build now, execution is running in background for which I am able to see output in consol but my browser and all execution on browser is NOT visible.
I tried searching around and change Jenkins service by checking allow window interaction checkbox but still not able to view it. I m running on window 10 and running with local(http://localhost:8080). I tried with Chrome, firefox & IE and all have same behavior of Not visible.
I used command "mvn clean test" in Build - Execute Windows batch command.
Same project is running with Eclipse & CMD very well with visible execution.
I am using Jenkins version 2.46.3.
Anyone experienced this? Any idea ?

Run Jenkins or slave from command line using war or jar provided, other option to try: check 'Allow service to interact with desktop' in Services.

After lots of search & troubleshoot, I found solution as I installed Jenkins as Window version (.exe) so I uninstalled it and downloaded Jenkins from official jenkins website(https://jenkins.io/download/) by clicking on Generic Java Package(.war) and then went into Command prompt and went to path where my Jenkins.war file dowloaded and install using java -jar jenkins.war and reregister with different accountname and password (created new account so it won't pull up the old account) and the Execution started DISPLAYING ON BROWSER. Hope this helps.

Related

Momentarily kill or restart Gradle Daemon from inside IntelliJ IDEA? "gradle --stop" doesn't work

IntelliJ IDEA 2021.1 and 2021.2 leaves the Gradle Daemon running when I exit the program. I would like to know if there is a way to momentarily stop or restart the Gradle Daemon from within IntelliJ without exiting. Gradle has a lock on files that doesn't go away when simply closing IntelliJ. The only way to get it to release the lock is to run gradle --stop from the version of Gradle that is currently running. The approaches I've found so far are far less than ideal. I'll share them in case they help anyone else, but I'm hoping there's a better way.
If I manually browse to my User Home.gradle\wrapper\dists\gradle-x.y.z-all<hash>\gradle-x.y.z\bin for the version of Gradle that I know IntelliJ is using, then I can manually run that gradle command with --stop flag and it will stop the daemon. So, yeah I guess I could create a batch script for this, but the fact that it is stored in such a buried directory involving some sort of hash code, I don't really want to have to change this script for different systems.
In InteliJ IDEA, If I click the "elephant" looking button at the top of the gradle menu called "Execute Gradle Task" it brings up a command line that starts with "gradle", but it only accepts established task names, it doesn't accept "gradle --stop". It gives the error Unknown command-line option '--stop'.
As a less than ideal work around, I have copied the gradle-x.y.z folder from near the end of that path to c:\Gradle\ and I have added that version's bin folder to the PATH environment variable. So, at least, I can open up a command prompt and run gradle --stop for now. This becomes problematic when I want my default / command line accessible gradle version to be different from the project I am working on. Yeah I could create a bunch of custom batch scripts that point to all different versions. That doesn't sound like fun. I have a hard time believing that I can't do something within IntelliJ to get the currently running gradle daemon to shutdown.
IDE does not kill Gradle daemon, because this demon can be reused by another build, including when doing a build from the command line.
There is an action Show Gradle Daemons (you can call it from Help | Find Action action):
It will show you the list of Gradle daemons with the ability to stop them:

Why sikuli desktop operation not working while running jar with ec2 startup script?

I have created windows AMI and in user data I am running command to run jar file, but jar running as a service when instance starts and jar unable to perform desktop click with sikuli. Same jar run perfectly fine if I manually start cmd on instance and run command for jar file.
Please suggest solution.
You need to have active UI to perform UI actions. Service is headless.
This is not a Sikuli specific problem

run maven project with jenkins in Ubuntu.

Same configuration is working with window 10. but when i tried same configuration run with ubuntu, its showing an error.
error message while running with jenkins
The clean plugin cannot delete the named folder. Make sure the Jenkins has the right to delete the folder and that it is not locked in some other way.
By the way: Copy the text of your error into the question, don't make a bad photo.
Some process has hold of the file /home/xelpmoc-06/Documents/Doc/zerodha/target/classes/LoginZerodha/Zerodha/App.class.
Java process or Eclipse or some other program is doing some job with it. So that's why its showing that error. So please kill Java Process or restart Eclipse. May be your jenkins build failure, also can cause this to happen. So if nothing works out please restart your jenkins itself.
Here I am attaching a link that may be helpful to you. Please go through this. Hope this helps.

Can the IntelliJ IDEA run tab have color?

I am running a spring boot application inside IntelliJ IDEA and noticed a difference if I run it via the run tab (run menu) and via manual command from the terminal tab.
If I run it through a maven run target (play button), I do not see any colors inside the 'run' tab. If I run it via 'mvn spring-boot:run from the 'terminal' tab I see the pretty color highlights. The maven run configuration also runs the same command, spring-boot:run.
Application started from the play button/run configuration (run tab):
Application started from the terminal tab via mvn spring-boot:run (terminal tab):
Inside build.gradle, add the following block to get colorized log output when running your Spring Boot app inside IntelliJ IDEA via gradle bootRun.
bootRun {
jvmArgs = ["-Dspring.output.ansi.enabled=ALWAYS"]
}
It's supported for the Spring Boot Run/Debug configuration type. It explicitly passes
-Dspring.output.ansi.enabled=always
JVM option enabling the color output.
As far as I know, ANSI colors support is not available when you run it in IntelliJ IDEA using Maven or Gradle configurations in the built-in console. Feature request is welcome.
In IDEA 2017.1 EAP I'm getting colours even if I'm just running the application with the standard run command
Edit:
Might be that Community edition doesn't support Spring Boot at all (https://www.jetbrains.com/idea/features/editions_comparison_matrix.html)
You can obtain the very same output also in the Community Edition with the previously mentioned option:
-Dspring.output.ansi.enabled=always
Simply go to "Run" -> "Edit Configurations..." and add the option in the "VM options:" field for your main class.

Why did Jenkins tell me to upgrade to Hudson?

I have the latest version of Jenkins, and I launched it with
"java -jar jenkins.jar."
Then I got an error
????: Failed Loading plugin rest-plugin hudson.util.IOException2: Unable to create instance of org.hudsonci.rest.plugin.RestPlugin from rest-plugin
After that, when I visit Jenkins at localhost:8080, Jenkins shows "New version of Jenkins (2.1.0) is available", and download link to Hudson.war 2.1.0**
Did the Jenkins merge back into Hudson? As far as I know, most people are saying Jenkins will be better than Hudson.
Is there anybody that knows what happened?
It sounds like what happened is this: you kept your old settings when you upgraded to Jenkins. This included the update URL, so Jenkins is polling the old Hudson url for updates. Once you fix this, you should be golden. To fix it, just do this:
Under Manage Jenkins, go to Manage Plugins and click on the advanced tab. Make sure that the Update URL is set to http://updates.jenkins-ci.org/update-center.json

Resources