Page 1 of 2

Jenkins CI

Posted: Wed Mar 05, 2014 1:38 pm
by Can
Hi everybody

I prepared Ranorex Test Case for my web application.It is running succesfully.I would like to Ranorex test example continous ıntegration Jenkins . I installed Jenkins on my local computer.(Localhost:8080)
I read tutorial (http://www.ranorex.com/blog/integrating ... on-process)
My ranorex test case exe file add on svn. I add MSBuild Plugin , Svn Plugin , Mail Plugin . I defined MSBuild exe .
And I click Build Now after that ı look log. Finished : Success
1) How to see Ranorex.Report on jenkins?
2) How can I be sure it is working correctly you?

Thanks

Re: Jenkins CI

Posted: Thu Mar 06, 2014 1:04 pm
by Support Team
Hi Can,

Have you already tried it as suggested in the blog?

Add Post-Build Action

After building and executing the application under test and the regarding test script, we will send an email which informs us about the success of the triggered build.

This email should include the zipped report file, mentioned before, as attachment.

Therefore add a new post-build action of type “Editable Email Notification”, choose the Report file location defined before as attachment, and add triggers for every job status you want to be informed about. In this sample an email will be sent if a job has failed or succeeded.

Furthermore:
After running the generated job you will see all finished builds within the build hierarchy with icons indicating the status of the individual builds.
You can view the zipped report files of all builds by opening them via the local workspace (“Workspace/Reports”):


Regards,
Markus

Re: Jenkins CI

Posted: Thu Mar 06, 2014 1:19 pm
by Can
Hi Markus

Thanks for helps.
But I set jenkins correctly. I think I do not set local jenkins configurations.
Several times ; I read Tim's blog on ranorex offical web site but ı do not understand.
--> My test case's exe file put on my svn .
--> I define MSBuild exe (on my local computer , general jenkins configurations.)
--> I set E-mail plugins (It is not important at this point.)
--> Add build step select MSBuild version and (.sln) --This (sln file) on my local sln file or svn sln file ?? Which one
--> Windows batch command "I write commands same as example .But it does not correctly."

Markus , I feel very angry for this problem. Where is my problem ?
How to reach Tim ?
Thanks

Re: Jenkins CI

Posted: Tue Mar 11, 2014 4:34 pm
by Support Team
Hi Can,

I am afraid I didn't get your questions!
May I ask you to answer the following questions?
Who do you mean with "Tim"?
Did you install Ranorex on the machine where Jenkins is installed on?
Did you start Jenkins as a service?
Do you get any error messages?
Can you please describe in detail what exactly didn't work?

Thanks,
Markus

Re: Jenkins CI

Posted: Tue Mar 11, 2014 5:15 pm
by odklizec
Hi,

I've setup Jenkins and Ranorex by following the mentioned integration blog and it worked quite well for me. It would be helpful if you post some screenshots from your Jenkins job configuration as well as the error you are getting.

Re: Jenkins CI

Posted: Mon Mar 17, 2014 2:15 pm
by Can
Hi odklizec

I read about Ranorex & Jenkins tutorial on blog .But Jenkins is not correctly run.
First of all ı want to describe my jenkins example.

1) Prepared ranorex test case.
2)The test case add svn .
3) Jenkins install on my local machine.
4) Add and Upgrade Jenkins Plugins.(MsBuild , Svn and Mailer plugin.)
5) Define local MsBuild file on jenkins.
6) Add mail address . Set Stmp defaults.
7) Creta New Job on Jenkins
8) Choose svn , I set Url .(Url = svn path)
9) Choose MsBuild . And .sln file (svn path)
10) Windows batch command My test case url on svn and write to example.
11)And click build now.
My test case run at 20 minustes (Average) However my test case run with jenkins 1 minute .I think it is not correctly.

Where am ı doing mistake ?

Thanks for helps.
See you later.

Re: Jenkins CI

Posted: Mon Mar 17, 2014 2:44 pm
by odklizec
Hi,

It's hard to say what's wrong with your Jenkins/Ranorex setup without seeing exact Jenkins job settings. Also, it would be good to see the Jenkins log file (from failed run) and eventually, the Ranorex report (if created). Could you collect all these things and post them here?

BTW, How do you start Jenkins? Make sure it's not started as service! It's mentioned at the very beginning of the integration blog...
http://www.ranorex.com/blog/integrating ... ss#ci-tool

Re: Jenkins CI

Posted: Mon Mar 17, 2014 3:35 pm
by Can
Hi

I don't write windows batch command so ı don't see report .
I have to write windows batch command ?

I am sure.Jenkins does not start as a service.

I write java -jar jenkins.war on cmd .
How to write windows command line on jenkins ?

Re: Jenkins CI

Posted: Mon Mar 17, 2014 4:07 pm
by odklizec
OK, if you run a Jenkins job, there is automatically created console output, where you can find all preformed steps. See this screenshot...
Jenkins_console.png
Just find the "Console Output" in an already finished job. If you click [raw] link, the console output is displayed as a plain text page, which you can save to txt file. Then attach this text file to your post so I (or anyone else here) can review it. If Ranorex is correctly integrated, this console output should display also the Ranorex steps. In any case, this log could be a great help to find out what's wrong with your job or setup.

Re: Jenkins CI

Posted: Mon Mar 17, 2014 10:00 pm
by Can
Hi
I click build now my jenkins project.And I look reports on jenkins.
The photo is jenkins reports .Add here.

Re: Jenkins CI

Posted: Tue Mar 18, 2014 8:21 am
by odklizec
Hi,

Now we are getting somewhere ;) I think there is incorrectly defined path to MSBuild in your Jenkins setings. Check the Path To MSBuild.exe
Your says:
c:\WINDOWS\Microsoft.NET\Framework\v3.5

But it should be:
c:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe

And this is why your build fails. I don't understand Turkish, but the next line, which actually tries to build your project, most probably complains about wrong/unrecognized path?

The reason why the Jenkins job says "success" is a bit of a mystery to me? I guess it has something to do with the fact that the msbuild did not even start, so there was not thrown a build error. And because CMD.exe alone did not throw an error, Jenkins thinks everything was finished OK, which was apparently not ;)

Re: Jenkins CI

Posted: Tue Mar 18, 2014 9:09 am
by Can
Hi
I set MsBuild exe on jenkins sytsem options.
And build log.I see time on this build : (Time Elapsed 00:00:00.32)
I think , it is not true . Impossible .
How to run windows batch command for zr report file on jenkins ?

Thanks for helps odklizec :) :| :oops:

Re: Jenkins CI

Posted: Tue Mar 18, 2014 10:01 am
by odklizec
Build now looks OK. What's probably missing in your job setup is a batch command section, where you define how to run the compiled project.

So add new step "Execute Windows batch command" where you should put something like this:
%WORKSPACE%\CIProject\bin\debug\CIProject.exe /zr /zrf:%WORKSPACE%\Reports\Report_%BUILD_NUMBER%.rxzlog
%WORKSPACE% is a Jenkins variable, which expands to the full path to your Jenkins workspace.
If the path is OK, Jenkins should start Ranorex test and at the end of test, there should be created a new Ranorex log in Reports directory.

If you are not familiar with Jenkins variables or relative paths, simply replace this workspace variable with a full path where the compiled project sits. Depending of your Ranorex project, you may also need to add some global parameters to the above path. Did you already tried to run the compiled project using command line? I mean outside Jenkins?

Re: Jenkins CI

Posted: Thu Mar 20, 2014 4:49 pm
by Can
Hi

Thanks for help odklizec.
I can not connect ranorex with jenkins :(

On the other hand Ranorex can run shadow mode ? If ı connect correctly ranorex and jenkins .Jenkins run shadow mode ?
Do you have information on this subject? I hope , ı connect ranorex and jenkins :D :D

Thanks

Re: Jenkins CI

Posted: Thu Mar 20, 2014 4:58 pm
by odklizec
Sorry, I don't have any clue what do you mean with "shadow mode"? If you do what I've mentioned above (or follow the Ranorex to Jenkins integration guide), Ranorex test should work just fine. What exactly is your problem? Could you post the Jenkins log after adding command line to run the Ranorex test?