Reuse CodeModule

Ask general questions here.
stefan.hartisch
Posts: 6
Joined: Fri Jul 24, 2020 8:17 am

Reuse CodeModule

Post by stefan.hartisch » Mon Jan 18, 2021 4:56 pm

Hello from Munich,

I'm sure this question has been asked and answered many times before, but it's so difficult to find the right thing in the mass of information.

I have written a code module that sets an application path depending on parameters and carries out various general checks. This code module is not AUT-specific and should be linked(!) into all solutions. How does this work?

Many thanks.
Best...
Stefan

User avatar
Mike K
Certified Professional
Certified Professional
Posts: 28
Joined: Wed Jun 28, 2017 5:58 pm

Re: Reuse CodeModule

Post by Mike K » Mon Jan 18, 2021 10:47 pm

Hi,

If the code module is generic enough to work on all AUTs is it possible to create a DLL of the code and import the DLL into Ranorex to create the application path?

User avatar
Stub
Posts: 443
Joined: Fri Jul 15, 2016 1:35 pm

Re: Reuse CodeModule

Post by Stub » Tue Jan 19, 2021 10:23 am

You might also be able to link common source code between projects via your source code control software. Or you can package up libraries as DLLs, wrap them in NuGet packages, and share them via a local NuGet feed. We do a bit of both here.

stefan.hartisch
Posts: 6
Joined: Fri Jul 24, 2020 8:17 am

Re: Reuse CodeModule

Post by stefan.hartisch » Tue Jan 19, 2021 11:23 am

Thanks so far.
Yes, the script is generic enough to run with any AUT.
For a tester and test 'automator' my programming skills are not bad, but still limited.
Another point is that I use the Ranorex mechanisms for parameter passing with Excel (application component & application variant resulting in the application path).
For me it's still not clear what to do.