Test Suite Runner and Jenkins

Ask general questions here.
Nickan
Posts: 2
Joined: Wed Dec 02, 2015 12:00 pm

Test Suite Runner and Jenkins

Post by Nickan » Fri Jan 29, 2016 8:36 am

Hi,

i have general questions about Ranorex and Jenkins (we just have started to use CI-tools).
But first some informations about our AUT:
We have to test a JavaFx2 application. At the moment we build and test the application at my desktop pc.
The build and test should be outsourced to an Jenkins Server where a Win7 VM is running.

Now my questions:
1. It is possible to just install the Test Suite Runner on the Virtual Machine of the Jenkins Server? At the moment we have just one premium licence for creating and running tests on my desktop machine. I will order a Runtime floating licence for the Jenkins Server.

2. Do we need more runtime licenses in order the tester could check the reports without Ranorex?

3. It is possible to "trigger" a Ranorex test with special keywords in the SVN Commit? We want to start the test run on the jenkins server manualy by passing "keywords" to SVN.
For example:
A developer commit changes on the source code to the repository that he wanted to be tested by Ranorex. The comment to this commit starts with for example "RUN_TEST". Now, Jenkins should recognize this "keyword" and trigger the Ranorex testrun.

4. Could Jenkins trigger a testrun, if we let run an ANT-Script before on the Jenkins server in order to automatically build our application? The ANT-Script should also just run, if the developer gives an keyword to a commit.

Thank you in advance for your help ;)
Andreas

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Test Suite Runner and Jenkins

Post by odklizec » Fri Jan 29, 2016 10:37 am

Hi Andreas and welcome here,

1) It should be enough to install just the Ranorex main components (+ runtime license), as described here:
http://www.ranorex.com/forum/post36220.html#p36220

2) You don't need a Ranorex license to just view the reports. It should be enough to copy these Ranorex files to target machine to be able to view the rxlog/rxzlog files...
Ranorex.Controls.dll
Ranorex.Core.dll
Ranores.Libs.dll
Ranorex.ReportViewer.exe
Eventually, you can always export Ranorex reports to HTML format. Then you don't need to use report viewer and simply view the reports in web browser. There is also a possibility to export reports to PDF, as described here:
http://www.ranorex.com/blog/ranorex-rep ... conversion

3) As for this question, it's Jenkins specific question. I'm no longer using SVN, but I think it should be possible to achieve what you want (sort of) with Jenkins SVN plugin and its Exclude Commit Message option. Here is a description of this option...
If set, and Jenkins is set to poll for changes, Jenkins will ignore any revisions with commit messages containing any of the given regular expressions when determining if a build needs to be triggered.
So basically, instead of passing a special keyword to trigger the test, your devs will have to pass a keyword to not trigger the test ;) The same keyword must be defined in Exclude Commit Message field.

BTW, there may be a Jenkins plugin, which does exactly what you want. So it's worth to examine available Jenkins plugins.

4) In Jenkins, you can define multiple 'build' steps, so it should not be a problem to build the application and then another 'build' step, which will simply run the Ranorex test (typically, you should use Execute Windows Batch command).

So the basic structure of your Jenkins project should look like this:
- source code management (svn plugin configuration)
- build triggers (poll scm)
- build your AUT (ant script)
- build Ranorex solution (using msbuild)
- run test (Execute Windows Batch command)

Hope this helps? ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Nickan
Posts: 2
Joined: Wed Dec 02, 2015 12:00 pm

Re: Test Suite Runner and Jenkins

Post by Nickan » Mon Feb 01, 2016 11:19 am

Thanks for the great and detailed answer odklizec ;) The structure you write for our Jenkins project was a big help. Thanks again ;)

Our IT-department will install Ranorex and the Jenkins plugins on thursday. So with your answers we should get it to work ;)
I'll post again if we have troubles or questions with Ranorex and Jenkins :wink:

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Test Suite Runner and Jenkins

Post by odklizec » Mon Feb 01, 2016 11:25 am

You are welcome ;) Good luck with Jenkins! If properly configured, it's definitely a great help and big time saver.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration