Steps to make a project library a reference to a project with tests

Best practices, code snippets for common functionality, examples, and guidelines.
qa-auto
Posts: 86
Joined: Mon Aug 05, 2019 10:46 pm

Steps to make a project library a reference to a project with tests

Post by qa-auto » Thu Aug 15, 2019 4:52 pm

Hi,

I'm new to Ranorex and just getting the automation off the ground for my project.

I am starting by creating a page object library with user code collections that I want to make available to other projects where tests will be written. Can someone point me to a resource with the actual steps?

Thanks!

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Steps to make a project library a reference to a project with tests

Post by Support Team » Fri Aug 16, 2019 11:56 am

Hi qa-auto,

You can create a Module Library project and use the dll, which will be created in the output folder when building the project. Simply add the dll to the References in your other projects.

Regards,
Bernhard

qa-auto
Posts: 86
Joined: Mon Aug 05, 2019 10:46 pm

Re: Steps to make a project library a reference to a project with tests

Post by qa-auto » Fri Aug 16, 2019 2:59 pm

Hi, Bernhard,

Thanks for your reply.

I played around with things and figured out the steps. Here they are in case someone else has the same question.

1. Library Project
Project > Project Options... set Output type to "Class library"
Build Solution
see bin/Debug for .dll generated

2. Start Test Project
Right Click on References folder > Add Reference
Go to .NET Assembly Browser tab
Click Browse
Select /LibraryProjectRoot/bin/Debug/library.dll
Gets added to Selected References
Click OK
References > Library.dll is added to the list

3. To get ongoing changes to Library into Test
Rebuild Library
Go to Test Project
Right click on References> Library.dll, select Refresh