nunit-console /run: & *.rxtst

Ask general questions here.
SanMan
Posts: 153
Joined: Tue Apr 13, 2010 9:59 am

nunit-console /run: & *.rxtst

Post by SanMan » Wed Oct 19, 2011 12:20 pm

Hi,

with Ranorex 2.x version I have run the testcases from console using NUnit (nunit-console /run: ...*.dll)

I have added the following lines of code:

using NUnit.Framework;

[TestFixture, RequiresSTA]
public class TestCase1
{
[TestFixtureSetUp]
public void Init()
{
}

[Test]
public void Test1()
{
}

[TestFixtureTearDown]
public void Dispose()
{
}
}

With Ranorex 3.1:
- Is it possible to add the *.rxtst here in [Test] and when using "nunit-console /run: ...*.dll", the Test Suite would be executed?

Hopefully someone get the idea what I am trying to do here.

Still learning the code :oops:

=> in a nutshell, I am trying to find a way to execute MyTest.rxtst from console to be run e.g. 5 times

User avatar
sdaly
Posts: 238
Joined: Mon May 10, 2010 11:04 am
Location: Dundee, Scotland

Re: nunit-console /run: & *.rxtst

Post by sdaly » Wed Oct 19, 2011 5:05 pm

Are you using the Studio to develop your tests? If so then can't you just use the Ranorex test suite runner? I'm not 100% sure as I don't use it, but I think there is an iteration number option...

If you are using NUnit then can't you just write the test the same way as your other ones, ie in a method decorated with an NUnit 'Test' attribute? You can then call that test five times in your batch script using the NUnit console runner, or add the NUnit 'Repeat' attribute to that test?...Either way imo, I don't see the need to mix the way you are triggering your tests...either go with the Studio, or NUnit and stick with it....

SanMan
Posts: 153
Joined: Tue Apr 13, 2010 9:59 am

Re: nunit-console /run: & *.rxtst

Post by SanMan » Thu Oct 20, 2011 6:04 am

Hi,

and thank you for your answer.
sdaly wrote:Are you using the Studio to develop your tests?
-> Yes, I am using Studio
sdaly wrote:I think there is an iteration number option...
-> This might resolve the problem
sdaly wrote:If you are using NUnit then can't you just write the test the same way as your other ones
-> Yes, this is the way I think to do these. But then I do not get any use for this new Test Suite (*.rxtst) and I should not add anything there?

User avatar
sdaly
Posts: 238
Joined: Mon May 10, 2010 11:04 am
Location: Dundee, Scotland

Re: nunit-console /run: & *.rxtst

Post by sdaly » Thu Oct 20, 2011 9:16 am

Ok so if you are using the studio and want to make use of the rxtst, then I would prob stick with that and not use NUnit at all....

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: nunit-console /run: & *.rxtst

Post by Support Team » Thu Oct 20, 2011 12:51 pm

Hi,

We added the Test Suite to help our users to create suites without NUnit. As suggested by Ccott, I would use the Test Suite instead of NUnit. On a Runtime Machine you can use the Test Suite Runner to execute the Suite. Or if you want to start your suite automatically use Ranorex in combination with Cruise Control. We use Cruise Control and Ranorex internally too.

Regards,
Peter
Ranorex Team
.
Image