Ranorex/Visual Studio/Test Manager Integration

Ranorex Spy, Recorder, and Studio.
jaredmatthews
Posts: 16
Joined: Fri Apr 18, 2014 1:06 pm

Ranorex/Visual Studio/Test Manager Integration

Post by jaredmatthews » Mon Apr 21, 2014 1:42 pm

Hi,

I am trying to implement "Running Ranorex Automated Tests with Microsoft Test Manager" following the blog post by Tobias. I am new to both Visual Studio and Ranorex. I have successfully imported my ranorex tests into a console application and a coded UI test. I can build them both successfully. I have built my tests into a console application in VS following a seperate blog post. As I am following the post stated above it talks directly about coded UI tests. When I build my coded UI test I get the error message:

"A project with an Output Type of Class Library cannot be started directly"

It goes on to say I need an executable project in this solution. I already brought in my test suite from Ranorex but I changed it to a Class Library as the blog suggested.

Do I need to import my Ranorex test suit into a Console application into my currect solution in VS as well?

My .exe is already added to this solution.

Any help would be appreciated. Thanks in advance

Jared
Regards,
Jared

mzperix
Posts: 137
Joined: Fri Apr 06, 2012 12:19 pm

Re: Ranorex/Visual Studio/Test Manager Integration

Post by mzperix » Tue Apr 22, 2014 1:18 pm

Hi jaredmatthews,

Looks like you want to run the Class library Project directly.

How did you add the Class Library project to the console application? You should add it as a Reference.

Regards,
Zoltan

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex/Visual Studio/Test Manager Integration

Post by krstcs » Tue Apr 22, 2014 1:38 pm

Jared,

Are you using Ranorex Studio? If not, I would highly recommend sticking with just Ranorex Studio until you are more comfortable with Ranorex and .NET coding. You can do anything you need to do with Ranorex in Ranorex Studio, there is no need to use Visual Studio with it.


As for the issue you are having, you would need to right-click on the project that you are trying to run and select "Properties". In the properties window, you will need to go to the "Application" tab (should be the default) and in the "Output type:" dropdown, select "Console Application". (It is probably set to "Class Library").

This assumes that you have a "Program.cs" file with a "Main(string[] args)" method already, otherwise it still won't run.

I would suggest that you create a new project and make sure to create it as an application or test suite instead of a Class Library or Test Library (in Ranorex Studio).
Shortcuts usually aren't...

jaredmatthews
Posts: 16
Joined: Fri Apr 18, 2014 1:06 pm

Re: Ranorex/Visual Studio/Test Manager Integration

Post by jaredmatthews » Tue Apr 22, 2014 1:51 pm

Thanks for the fast responses. We have a bunch of tests already made in Ranorex studio. I just started here and they want me to automate our test suites using TFS and Test manager. I found this blog:

running-ranorex-automated-tests-using-microsoft-test-manager

Sorry I cant post URL's yet.

So I created a new Coded UI Test and then Imported the Ranorex Test Suite as a Class Library and also added it as a reference.

I think I understand now that I need to add the class library as a reference to the coded ui test but then also import the test as a console application instead of the class library. Only using the class library as a reference.

Does this sound correct?

Thanks,
Jared
Regards,
Jared

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex/Visual Studio/Test Manager Integration

Post by krstcs » Tue Apr 22, 2014 2:18 pm

I don't use TFS or Test Manager, so I can't answer the technical questions about them.

However, in my opinion, there is no need for TM. It just adds unnecessary complexity. Ranorex does everything you need except SCM (which you get with TFS).

It's like buying a truck to carry your car back and forth to work. Why not just use the car? But maybe that's just me? :D

But, I do understand that that is what you have to work with. :D
Shortcuts usually aren't...

jaredmatthews
Posts: 16
Joined: Fri Apr 18, 2014 1:06 pm

Re: Ranorex/Visual Studio/Test Manager Integration

Post by jaredmatthews » Tue Apr 22, 2014 2:27 pm

No problem I appreciate you taking the time to answer my questions.
Regards,
Jared