I'm trying to execute my suite via Jenkins. I've created an account and a project as it's mentioned in Katalon's tutorial. When I run the project it gets stuck and doesn't complete the execution. This is the screen that I keep seeing:
Console Output img
This is the build configuration:
Build Configuration img
I tried executing via cmd and it worked properly so I'm not sure what the problem is.
Thanks.
[Solved]
I Just forgot to delete the -noExit and -consoleLog parameters
Related
I am trying to run some automated tests for desktop apps. The code is written in Robot Framework and Sikuli. If I run them from command line, it is okay, but when I try it from Jenkins it is not.
Here is how I try to build in Jenkins
Here is the simple code:
Help
[Tags] help
Capture Screen
Click input_id
This is the result:
As you see it could not see my screen. What should I do to let the "Jenkins process" see my screen?
The issue was, that I installed Jenkins as a Windows service. After I installed via the jenkins.war file, it works.
I run BUILD in TFS, and one of the steps contains executing the .exe file.
If i run this .exe file separately, on the remote PC where BUILD is running, it operates correctly and successfully.
But when it is being called from BUILD, it simply gets stuck on this stage.
I used debug mode, copied exactly the command it is running of this type:
C:\Windows\system32\cmd.exe /c "C:\Agents\Agent2.....<my path>...\my_file.exe"
Copied it, used the Win+R (run), pasted - it works perfectly.
When can't the BUILD run the .exe file?
Thanks.
I suppose because the application is trying to do something UI-y. The agent is running as a service and any application running during the build should not use the UI in any way. Anything that relies on Windows Forms, WPF or the Message Pump won't work as long as the agent isn't running Interactively.
Try running the exact command from a scheduled task, that should also allow you to test non-interactively.
I have a series of frontend tests written in CasperJS that I need to run in Jenkins. Here is command I run from the command line: casperjs test ./src/tests/**/ts_*.js --xunit=xunit.xml. This runs the tests and saves the xunit file. Ok. When I have Jenkins run the same command it gets through loading the first test page and spits out this error: "Process leaked file descriptors" and directs me to: https://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build
It provides an explanation and a few OS specific work arounds. The environment this will be run on will eventually be linux however my development environment is Windows and I don't understand the workaround they provide. What kind of file is that and how does it fit with Jenkins?
Does anyone have experience running CasperJS tests using Jenkins?
I installed jenkins as a service and use default settings.
I solved same issue on windows.
if you are running as a service and default home directory ( c:/program files(x86)/jenkins/ )
you have to change path to other normal folder(ex.c:/jenkins/").
SET JENKINS_HOME=c:\jenkins\
What I do with jenkins and casper:
I create a job with string parameter 'tests', which takes *.js or specified test
and try to run casper tests via Build -> Execute shell
cd ~/test_directory
casperjs test ${tests}
I have built a new "Hello World" plugin for Jenkins and I was able to upload it onto Jenkins and it works successfully. I am now trying to make change to the plugin and debug it on Jenkins. I did this according to the instructions on this tutorial https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
I tried this command:
mvnDebug hpi:run
and then start to debug from eclipse to the port 8000 which is the port that Jenkins opens up for debugging. The eclipse was able to connect to the correct port and I got the message which seems to be correct:
[info] Jenkins is fully up and running
It seems that everything went OK. Then I go to localhost:8080 to see the plugin but I found nothing there. Can anybody help me with this, please? Thanks.
Ok, about debugging Jenkins plugins, I know that there is a little amount of information. I can tell you how I debug:
Using the tutorial from https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial#Plugintutorial-DebuggingaPlugin
1. stop jenkins service
2. from cmd I run
set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
and
mvn hpi:run
Note: Build automatically must be unchecked in Eclipse. And after I run mvn hpi:run I try to connect Eclipse to the port using java remote ( or something like this).
The second method that I use is:
1. I installed maven plugin in eclipse
2. Create a run configuration as maven in eclipse
3. Stop jenkins server
4. Run the configuration
5. Access localhost:8080/jenkins
Sorry for not giving the exact steps but I have those configurations on my PC at work...
Also, in my opinion the second method is more stable. I use it frequently when I work with my plugin...
I can't seem to run a build execute shell step in Jenkins. I've worked with Hudson in the past on windows and I was able to create shell/batch steps without a problem but I seem to be be missing something here.
It's a fresh jenkins install and I go to "add build step", "execute shell" and enter "echo hi" in the command. I run the build and when I look in the console output, nothing happens.
I've also tried executing a test.sh file which also just echoes hi. I've tested this in both a linux install and an os X installed Jenkins server.
What am I missing in the configuration to run a shell script?
The console output shows that the shell script steps were skipped completely
Started by user admin
Finished: SUCCESS
It looks like Jenkins is not being able to redirect the output from the system. What version of Java are you using? If you're using OpenJDK, could you try with Sun Java/Sun JDK?
First test to try to check if anything is executing at all: add the following to your "Execute Shell"
#!/bin/bash
echo "HELLO WORLD" > /tmp/testfile
Run this and check if there is a /tmp/testfile in on your Linux system, and if it contains the HELLO WORLD text, it means your script is in fact executing.
Which version of Jenkins do you have?
The last good version that I can attest to (last one I know works well at least for us) is 1.447. If you're not using that one, would you be able to try with it?
Also, could you add #!/bin/sh or #!/bin/bash before echo hi on your "Execute Shell" for the Linux system and see if that works.
Also, try running a script using source /path/to/script and see if that works. The script should contain #!/bin/sh or #!/bin/bash as the first line, just to see if that makes a difference.
Note: none of this should be required, but is helpful just to get more information on what's going on. Couldn't fit all this into a comment. I'll update my answer based on your answers to the above, or delete if I can't get anything..
Putting this here for posterity.
I had a Jenkins project configured with Maven running clean test and a execute shell in the pre steps. The logs from Maven where not coming through and the script was not executing. Once I unchecked Build modules in parallel under the Maven build options my logs and scripts started working.
Make sure its in a location where Jenkins can see it, check permissions.