Adding Module to Test Case through code.

Class library usage, coding and language questions.
Lex
Posts: 4
Joined: Mon Sep 30, 2019 7:38 pm

Adding Module to Test Case through code.

Post by Lex » Mon Sep 30, 2019 7:43 pm

Hello,

I was wondering if there would be a way to add a code module to a test case through code.

This would be used to add extra modules to the test case in case they were forgotten to be added or add a set just to save time.

Thank you,
Lex

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5187
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Adding Module to Test Case through code.

Post by odklizec » Tue Oct 01, 2019 9:01 am

Hi,

I'm afraid, there is no way to 'physically' add code/recording module to test case/suite via code, if you mean that? I think the best approach is having all test cases in test suite and then simply run them via command line, either using pre-configured "run configurations" sets or by calling individual test cases. Then you should not have a problem with 'forgotten' test files?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Lex
Posts: 4
Joined: Mon Sep 30, 2019 7:38 pm

Re: Adding Module to Test Case through code.

Post by Lex » Tue Oct 01, 2019 12:33 pm

odklizec wrote:
Tue Oct 01, 2019 9:01 am
Hi,

I'm afraid, there is no way to 'physically' add code/recording module to test case/suite via code, if you mean that? I think the best approach is having all test cases in test suite and then simply run them via command line, either using pre-configured "run configurations" sets or by calling individual test cases. Then you should not have a problem with 'forgotten' test files?
The use of this is to add many small and often forgotten modules that are necessary for other modules to execute. It would just be a small and helpful feature within my code to make sure each test case will have the required modules to be able to run.

I assumed that because the Test Suite is just XML I’d be able to edit it, but I haven’t been able to find a way to generate the IDs.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5187
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Adding Module to Test Case through code.

Post by odklizec » Tue Oct 01, 2019 12:38 pm

Hi,

I'm afraid, there is definitely no publicly available way to achieve what you want.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration