How to get the Test Name which I am executing during Run Time ?

4 posts, 0 answers
  1. Abdul Khader
    Abdul Khader avatar
    22 posts
    Member since:
    Feb 2016

    Posted 26 Sep Link to this post

    Hi Team,

     

    I have tried below code but it isn't working

    using System.Runtime.Serialization;

     

    Log.WriteLine(this.ExecutionContext.Test.Name.ToString());

     

    Below is the error i am getting after compiling above code

     

    d:\Financials Panel\fgdg.tstest.cs(87,49) : error CS0012: The type 'System.Runtime.Serialization.IExtensibleDataObject' is 
    defined in an assembly that is not referenced. 
    You must add a reference to assembly 'System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.


    d:\Financials Panel\fgdg.tstest.cs(87,49) : error CS0012: The type 'Telerik.TestStudio.Interfaces.Storage.IDataTransport' is 
    defined in an assembly that is not referenced. 
    You must add a reference to assembly 'Telerik.TestStudio.Interfaces, Version=2016.2.630.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de'.

     

    Thanks

    Abdul

  2. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    254 posts

    Posted 27 Sep Link to this post

    Hello Abdul,

    Have you added the assembly reference to your project along with adding it with a 'using' statement? 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Abdul Khader
    Abdul Khader avatar
    22 posts
    Member since:
    Feb 2016

    Posted 27 Sep in reply to Elena Tsvetkova Link to this post

    Elena,

     

    I am NOT sure which dll i need to reference. Can you please guide me ?

     

    Also I can see only the dll's in the bin folder of Telerik in the attached screenshot.

    Thanks

    Abdul

  4. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    254 posts

    Posted 30 Sep Link to this post

    Hi Abdul,

    What is the location from your screenshot where you try to find the dll? This file could be found in the .NET framework libraries. You will certainly find in more than one location but it is important to take the same version as the listed in the exception - namely Version=4.0.0.0. Usually all these libraries could be found in the following location: "C:\Windows\Microsoft.NET". 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top