Page 1 of 1

Adding Module to Test Case through code.

Posted: Mon Sep 30, 2019 7:43 pm
by Lex
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

Re: Adding Module to Test Case through code.

Posted: Tue Oct 01, 2019 9:01 am
by odklizec
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?

Re: Adding Module to Test Case through code.

Posted: Tue Oct 01, 2019 12:33 pm
by Lex
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.

Re: Adding Module to Test Case through code.

Posted: Tue Oct 01, 2019 12:38 pm
by odklizec
Hi,

I'm afraid, there is definitely no publicly available way to achieve what you want.