Adding an external DLL to coded step in Test Studio.

17 posts, 0 answers
  1. SD
    SD avatar
    62 posts
    Member since:
    Apr 2010

    Posted 27 Sep 2012 Link to this post

    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.
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 03 Oct 2012 Link to this post

    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
  3. SD
    SD avatar
    62 posts
    Member since:
    Apr 2010

    Posted 04 Oct 2012 Link to this post

    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 ?

  4. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 08 Oct 2012 Link to this post

    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
  5. SD
    SD avatar
    62 posts
    Member since:
    Apr 2010

    Posted 08 Oct 2012 Link to this post

    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.
  6. SD
    SD avatar
    62 posts
    Member since:
    Apr 2010

    Posted 08 Oct 2012 Link to this post

    Ok, found the vid.
  7. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 09 Oct 2012 Link to this post

    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
  8. Jahved Aktaar
    Jahved Aktaar avatar
    1 posts
    Member since:
    Jul 2012

    Posted 19 Apr 2013 Link to this post

    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..
  9. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 24 Apr 2013 Link to this post

    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
  10. Brian
    Brian avatar
    2 posts
    Member since:
    May 2013

    Posted 10 Oct 2013 Link to this post

    Is it still necessary to add libraries to the GAC if using a scheduling server with Test Studio 2013 R1 latest?
  11. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 15 Oct 2013 Link to this post

    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
  12. Chandresh
    Chandresh avatar
    41 posts
    Member since:
    May 2015

    Posted 27 May 2015 in reply to Boyan Boev Link to this post

    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 ?

  13. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 01 Jun 2015 Link to this post

    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
     
  14. Chandresh
    Chandresh avatar
    41 posts
    Member since:
    May 2015

    Posted 01 Jun 2015 in reply to Boyan Boev Link to this post

    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.

  15. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 02 Jun 2015 Link to this post

    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
     
  16. Chandresh
    Chandresh avatar
    41 posts
    Member since:
    May 2015

    Posted 04 Jun 2015 in reply to Boyan Boev Link to this post

    Boyan,

     

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

     

    Thanks,

    Chandresh

  17. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 04 Jun 2015 Link to this post

    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
     
Back to Top