Hi,
is it possible to start a testcase from Ranorex Studio, caused by a condition?
For example, when I have a function inside a code module wich returns a bool value, can I do something like:
If function = true then
start Testcase 1
Else
start Testcase 2
Could somebody please give me a code example in VB.net if something like this is possible?
Thanks in advance
Starting Testcase by condition
Re: Starting Testcase by condition
Hello,
Hope this helps
I do this with the following C# usercode:Hermch wrote:If function = true then
start Testcase 1
Else
start Testcase 2
Code: Select all
bool l_Test = function();
TestSuite.Current.GetTestCase("Testcase1").Checked = l_Test ;
TestSuite.Current.GetTestCase("Testcase2").Checked = !l_Test ;
SW
Re: Starting Testcase by condition
Thanks for your response.
I think this code does not exactly what I want to do.
I need something that checks a conditions, depanding on this condition Testcase 1 or Testcase 2 should start, right after checking the condition.
Is this possible?
I think this code does not exactly what I want to do.
I need something that checks a conditions, depanding on this condition Testcase 1 or Testcase 2 should start, right after checking the condition.
Is this possible?
Re: Starting Testcase by condition
In my code I have TestCaseCheck(a Record Module with a userCode with the "Testcase selection")Hermch wrote:I need something that checks a conditions, depanding on this condition Testcase 1 or Testcase 2 should start, right after checking the condition.
Is this possible?
and TestCase1 and Testcase2 just after. I think it will do what you need.
SW
Re: Starting Testcase by condition
Hmm this does not work with my tests.
Nothing happens after this code is executed:
I want that "Test_1" is executed when this code is running.
How can I achieve that?
Nothing happens after this code is executed:
Code: Select all
TestSuite.Current.GetTestCase("Test_1").Checked = True
How can I achieve that?
Re: Starting Testcase by condition
Hello,
I create a little solution to show you the principle. It write in the log if the testId (from connector) is odd or even:
I create a little solution to show you the principle. It write in the log if the testId (from connector) is odd or even:
You do not have the required permissions to view the files attached to this post.
SW
Re: Starting Testcase by condition
Great, thank you 
