Easiest way to integrate Test Cases

Ask general questions here.
Jimmyto
Posts: 18
Joined: Wed May 10, 2017 7:37 pm

Easiest way to integrate Test Cases

Post by Jimmyto » Wed May 31, 2017 4:28 pm

Hi All,

Wanted to know, what's the easiest way to integrate Test Cases from different users.

Ranorex version: latest version 7.0
Platforms: Win8 & Win10

Example: I create a few test cases and want to share with a co-worker so he can add more to it.
Another exmaple is: I'm automating a piece and my coworker is automating the other piece. How do we integrate these TC into on solution?

We've done it but it was a pain.. What's the best way to do this?

Thanks in advance!
Jimmy

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

Re: Easiest way to integrate Test Cases

Post by odklizec » Thu Jun 01, 2017 8:03 am

Hi Jimmy,

Are you using some sort of version control system (SVN, GIT, TFS,...)? If not, you should immediately adopt one. You will have to merge the code from different users working on the same solution.

In my opinion, to make the things easier, each user should work on a different test case. The only conflicts you might then see (during the merge) could be in repository, which you will most probably have to merge manually.

Of course, you might get some conflicts also if someone changes shared recordings/code modules, used in different test cases. You will also have to merge these differences manually and test if the changed modules are still compatible with other test cases.

Also, I would also suggest to read below blog post. It's older, but still valid ;)
https://www.ranorex.com/blog/organizing ... est-suite/
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

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: Easiest way to integrate Test Cases

Post by qwertzu » Thu Jun 01, 2017 8:15 am

Hello Jimmyto,

I agree to odklizec. You should use a Source Control System like git or svn.
Please also take a look into the Ranorex User Guidein order to find more information about how to use source control:
https://www.ranorex.com/support/user-gu ... ntrol.html

regards,

qwertzu

Vaughan.Douglas
Posts: 250
Joined: Tue Mar 24, 2015 5:05 pm
Location: Des Moines, Iowa, USA

Re: Easiest way to integrate Test Cases

Post by Vaughan.Douglas » Thu Jun 01, 2017 12:23 pm

First, source control is critical for reasons beyond the particular issue you're currently facing.

Second, even with source control this can be challenging because a lot of the underlying Ranorex files are just XML and diffing those can be problematic.

I would recommend a solution with multiple projects. You should create a Module Library Project to store those modules you'd like to use back and forth. I've then found that giving each person developing automation their own test suite project. Just make sure modules that are to be shared across projects are in that Module Library project. This makes the merge process much easier.

You can always come back and integrate the disparate test suites in the project into a single test suite.

Again this is all best accomplished through a good SCM tool like GIT or SVN.
Doug Vaughan

tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: Easiest way to integrate Test Cases

Post by tvu » Thu Jun 01, 2017 7:36 pm

+1 on Vaughan.Douglas' suggestions.

We had multiple people developing test cases in a single test suite and have had an incredibly hard time merging the RXTST file that contains the test cases. More often then not we would have to recreate a test case after the merge.

Having multiple test suites and having only one person making changes to a single test suite would save you a bunch of time.

But, if you must use a single test suite then you can do the following to merge your test case.
  • Make sure that each person is working on a separate test case. Each test case should have a unique name.
  • Merge your RXTST file using your source control.
  • Open the test suite in Ranorex and simply move one test case into the other.
You will definitely have merge issues if you are working on the same test case with the same name.

Jimmyto
Posts: 18
Joined: Wed May 10, 2017 7:37 pm

Re: Easiest way to integrate Test Cases

Post by Jimmyto » Thu Jun 01, 2017 9:14 pm

Thanks for the responses and Yes we plan to use TFS as source control..

@TVU Thanks that exactly what we did and we're trying to make it work as we have such short time and wanted everyone to contribute but we did run into a few nightmares merging files RXTST and other.

Thanks again!
Jimmyto

tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: Easiest way to integrate Test Cases

Post by tvu » Thu Jun 01, 2017 10:12 pm

@Jimmyto

You can quickly setup something like this with your current solution.

Code: Select all

Solution
    1. MainTestSuite
    2. Project containing the Repo Library and Recordings
    3. TempTestSuite1
    4. TempTestSuite2
Have one person develop their portion of the test case in TempTestSuite1 and another person develop their portion of the same test case in TempTestSuite2. Then you can copy and paste each portion into a single test case in MainTestSuite. This is simple to setup and easily put into TFS. You would completely avoid the merge issue and save time.

Vaughan.Douglas
Posts: 250
Joined: Tue Mar 24, 2015 5:05 pm
Location: Des Moines, Iowa, USA

Re: Easiest way to integrate Test Cases

Post by Vaughan.Douglas » Fri Jun 02, 2017 1:12 pm

tvu wrote:@Jimmyto

You can quickly setup something like this with your current solution.

Code: Select all

Solution
 1. MainTestSuite
 2. Project containing the Repo Library and Recordings
 3. TempTestSuite1
 4. TempTestSuite2
Have one person develop their portion of the test case in TempTestSuite1 and another person develop their portion of the same test case in TempTestSuite2. Then you can copy and paste each portion into a single test case in MainTestSuite. This is simple to setup and easily put into TFS. You would completely avoid the merge issue and save time.
The "Project containing the Repo Library and Recordings" probably should be a Test Module Library project. I encourage all users to add this project type to their solution immediately. This is the second or third time this has come up in the past couple of days, so I've added a uservoice suggestion for an option to automatically add a Test Suite Module Library project when creating a new solution. If others find this valuable, please consider voting on the issue. Also please add comments and suggestions, I get nothing out of this I just want to see the best possible product.
Doug Vaughan

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Easiest way to integrate Test Cases

Post by Stub » Mon Jun 05, 2017 8:32 am

I've also been splitting my repositories up into smaller fragments and adding subversion locks to the files so they cannot be edited by multiple developers. This avoids merge conflicts on these files. These repo's live in a test module library project.