This is a migrated thread and some comments may be shown as answers.

Adding an external DLL to coded step in Test Studio.

18 Answers 421 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
SD
Top achievements
Rank 1
SD asked on 28 Sep 2012, 01:44 AM
Hi,

I have added our DLL to a Test Studio project thru Show->Scripts options.
When I got back to the coded step and tried to add a 'using' statment to include the above DLL,
it was not showing (All the other MS dll and Teleriks show).
The DLL I'm trying to add has been generated using VSE 2008 and contains various test methods written
with webaii methods.

Please let me know how it's suppose to be done.

Ta.

18 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 03 Oct 2012, 09:48 AM
Hi Ta,

I apologize for the delay in getting back to you. The easiest way to overcome this problem is to add your custom .dll to the GAC(Global Assembly Cache). You can do this by simply dragging and dropping the file into your C:\WINDOWS\Assembly folder. Once added to the GAC Test Studio will automatically find it there and use it, which is a standard feature of Microsoft's .NET framework.

If you continue to have difficulty, please place your custom .dll in a zip file and send that to us. We want to reproduce the issue and try to determine what is causing it.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
SD
Top achievements
Rank 1
answered on 04 Oct 2012, 05:35 AM
Ta for that. The DLL is requried to be strongly named before it can be dropped
into the GAC folder. Are there any addtional Telerik specific reqs in order to use that an external DLL with TS ?

0
Plamen
Telerik team
answered on 08 Oct 2012, 02:41 PM
Hi SD,

Yes you are right, the dll needs to be strongly named in order to be registered in the GAC. However I just found out there is no need to do that if you are not performing a remote execution or using the dll from a remote location.

I also discovered a bug in Test Studio explaining the behavior you are experiencing. I created a custom dll and added it in the Project References. Then I went back to the code behind and tried to add a using statement, however my custom dll wasn't there. Then I restarted the project and it appeared as expected. See this video.

I filed a bug on this. You can track its progress and vote for the PITS Issue here: Public URL.

I have also updated your Telerik points accordingly.

All the best,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
SD
Top achievements
Rank 1
answered on 08 Oct 2012, 11:42 PM
Hi Plamen,

No, I'm not using  remote execution or using the dll from a remote location.
If I understand correctly you saying that all is requried at this stage is to add the DLL thru Project Ref and restart TS ?
I belive I have tried that and was not succesful.

In our case, the ability to load our own DLL is essential for purchasing the product.
In addition, what video are you refering to ? I cannot see any link.

Ta,
Seth.
0
SD
Top achievements
Rank 1
answered on 08 Oct 2012, 11:44 PM
Ok, found the vid.
0
Plamen
Telerik team
answered on 09 Oct 2012, 08:09 AM
Hello,

I am sorry, I provided the video in the bug description. Here's the link:
http://screencast.com/t/JteDnOP7K7o

All the best,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Jahved Aktaar
Top achievements
Rank 1
answered on 19 Apr 2013, 02:38 PM
Hi Team,

What is the status of this defect.. I am trying to use "ibm.data.db2.dll" but having the above issues.. Can't access it via coding. i am using the latest version of Telerik..
0
Plamen
Telerik team
answered on 24 Apr 2013, 11:15 AM
Hello Jahved,

I am sorry to hear you are running into this problem. The bug you are refering to is already fixed in the latest version of Test Studio. As you can see in this video, I was able to create a simple dll and use it in a coded step without issues. Could you please record a short video demonstrating the issue you're experiencing, so we can better understand what is happening? Jing is a good and free screen recorder.

Kind regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Brian
Top achievements
Rank 1
answered on 10 Oct 2013, 06:31 PM
Is it still necessary to add libraries to the GAC if using a scheduling server with Test Studio 2013 R1 latest?
0
Boyan Boev
Telerik team
answered on 15 Oct 2013, 01:49 PM
Hi Brian,

Thank you for contacting us.

It is not necessary to add the custom dll to the GAC. To make this work you have to copy your dll to the ROOT directory of project, then just refer it from that location.

Note this will work only if you put the dll in the root directory as it is described at the bottom of this article. Test Studio will not find references to a DLL in the subfolders of the project folder. These include: bin, Properties, obj, Data, Backup, TestResults, Results, TestLists, and Profiler Configurations.

Hope this helps. 

Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Chandresh
Top achievements
Rank 1
answered on 27 May 2015, 12:30 PM

Hi Boyan,

I am facing same issue with TestStudio v2015.1.319.0. I have tried below options to use my custom dll and none of them worked.

  1. Put dll in Project Root folder. (Root path: D:\Telerik Projects\TestProject1\Demo.dll)

  2. Put dll in assembly folder. (Path: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Demo.dll)

  3. Put dll in any other folder on system. (Path: E:\Telerik References\Demo.dll)

 

Is there any change in how TestStudio identifies the referenced dll ?

0
Boyan Boev
Telerik team
answered on 01 Jun 2015, 06:51 AM
Hi Chandresh,

Do you execute the test remotely on another machine? If so you should copy your custom dll to the root directory of the project.

After that you should refer it from that location. Have you done this?

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Chandresh
Top achievements
Rank 1
answered on 01 Jun 2015, 07:17 AM

Thanks for your reply Boyan. 

 

No, I am executing test on local machine only. I added reference and when I went back to coded step to use that dll function it didn't allow me.

0
Boyan Boev
Telerik team
answered on 02 Jun 2015, 07:51 AM
Hi Chandresh,

Could you please send us the dll so we can review it.

Looking forward to hearing from you.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Chandresh
Top achievements
Rank 1
answered on 04 Jun 2015, 05:23 AM

Boyan,

 

I can not share dll with you as this is our Project dll. Is there anyother way we can handle this ?

 

Thanks,

Chandresh

0
Boyan Boev
Telerik team
answered on 04 Jun 2015, 11:57 AM
Hello Chandresh,

If you cannot add the reference assembly at all we really need that dll to debug the reason. You don't need to worry about any sensitive data. You can send us the dll in a private ticket which is 100% confidential.

Another option which could help us is to send us the application log. Clear it first and then try adding the assembly again.

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Anshika
Top achievements
Rank 1
answered on 13 Mar 2019, 12:11 PM
Hi, I'm facing a similar issue. Where can I find the video you are referring to?
0
Elena
Telerik team
answered on 15 Mar 2019, 04:53 PM
Hello Anshika,

Please note that you are addressing a forum post from over 3 years ago and the issue, you experience, may be caused by anything different. This is why I would recommend we first start with a description of what you experience. 

The initial query in this thread states that an external dll can be added in the Project settings but cannot be used in the coded file - is this what you observe as well? If so, have you inserted a using statement in the coded file as well?

Please, elaborate more on what is the misbehavior on your end - that way I can better understand what this might be caused by. It will be also useful, if you can provide the dll in question to test this on my end. 

I am looking forward to hearing back from you and continue the investigation accordingly. Thank you in advance for your understanding. 

Regards,
Elena Tsvetkova
Progress Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
SD
Top achievements
Rank 1
Answers by
Plamen
Telerik team
SD
Top achievements
Rank 1
Jahved Aktaar
Top achievements
Rank 1
Brian
Top achievements
Rank 1
Boyan Boev
Telerik team
Chandresh
Top achievements
Rank 1
Anshika
Top achievements
Rank 1
Elena
Telerik team
Share this question
or