In my current project, it makes sense to dynamically create test case out of smaller building blocks.
It means, that I'd rather have a runtime-built test case containing other testcases (along with all the data-bindings and setup/teardown), than a static flow with all possible testcases in it, where every testcase starts and eventually checks if it makes sense to run it currently.
So, my question is: how do I programmatically operate objects like TestSuite, TestCase, TestModule, DataSource?
Then, I'd create pre-defined code/recording modules at design-time. At the runtime, after parsing configuration, I'd create sufficient number of test cases, each of which would consist of specific steps (sub-testcases) made of specific test-steps (modules) repeated given number of times with appropriate data-bindings. Each of the test cases would consist of only required test steps, hence the report would look nice and clean.
Is there a way to do it in such way?
How to: dynamically create workflows?
-
- Posts: 7
- Joined: Thu Oct 20, 2011 1:55 pm
How to: dynamically create workflows?
Adam Hepner
REC Solutions sp. z o.o.
REC Solutions sp. z o.o.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: How to: dynamically create workflows?
Hi,
If you want to interact with the TestSuite, TestCases, TestModules, please take a look to following API Documentation.
http://www.ranorex.com/Documentation/Ra ... esting.htm
Regards,
Peter
Ranorex Team
If you want to interact with the TestSuite, TestCases, TestModules, please take a look to following API Documentation.
http://www.ranorex.com/Documentation/Ra ... esting.htm
Regards,
Peter
Ranorex Team
-
- Posts: 7
- Joined: Thu Oct 20, 2011 1:55 pm
Re: How to: dynamically create workflows?
Well, I don't want to interact with them, I want to create them
. I've read through aformentioned documentation, I hacked a little bit in trial, but haven't been able to find, what I have in mind...?

Adam Hepner
REC Solutions sp. z o.o.
REC Solutions sp. z o.o.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: How to: dynamically create workflows?
Hi,
Usually it is possible but we have no documented API for this and we don't suggest our users to create their own test suites/test cases. For sure it's not that big deal, but if you want to use the data context then it starts to get complex.
Regards,
Peter
Ranorex Team
Usually it is possible but we have no documented API for this and we don't suggest our users to create their own test suites/test cases. For sure it's not that big deal, but if you want to use the data context then it starts to get complex.
Regards,
Peter
Ranorex Team
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Re: How to: dynamically create workflows?
How about just wraping your modules into test cases and testsuite?
TestReport.BeginTestSuite("Suite"); TestReport.BeginTestCase("Test case A"); MyModuleA(); if (confition) { MyModuleB(); } TestReport.EndTestCase(); TestReport.SaveReport();Of course each module must contain BeginModule and EndModule methods so the report looks nice.