Call a method from one testcase to another

Ranorex Spy, Recorder, and Studio.
cruzez
Posts: 24
Joined: Thu Jan 27, 2011 3:03 am
Location: London, UK

Call a method from one testcase to another

Post by cruzez » Thu Mar 05, 2015 5:37 pm

Is it possible to call a method in a TestA into another method of TestB?

I can call TestA.Start() somewhere in TestB code. But I want to Call just a method from one of other tests possible?

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

Re: Call a method from one testcase to another

Post by krstcs » Thu Mar 05, 2015 5:52 pm

It's .NET, so yeah, as long as you setup the methods with the right protection level and instantiate objects when needed.
Shortcuts usually aren't...

cruzez
Posts: 24
Joined: Thu Jan 27, 2011 3:03 am
Location: London, UK

Re: Call a method from one testcase to another

Post by cruzez » Thu Mar 05, 2015 6:59 pm

Sorry my apologies, I didn't explain fully.

TestA has a method from another class that uses datasource which will set values
I am trying to call TestA with method, don't know how I can bind values