Getting deployment directory when executing through Nunit

2 posts, 0 answers
  1. VVP
    VVP avatar
    26 posts
    Member since:
    Sep 2015

    Posted 15 Sep 2015 Link to this post

    Hi All,

    I was following this link : and trying to execute test using NUnit.

    I can't use this.ExecutionContext.DeploymentDirectory, But i am unable to find a similar function like "this.ExecutionContext.DeploymentDirectory;".

    Is there anything we can use for Nunit execution.

    I tried AppDomain.CurrentDomain.BaseDirectory; and getting directory.But when i tried 

    Console.WriteLine("currentExecutionDirectory is :" + ArtOfTest.WebAii.Design.Execution.ExecutionContext.Current.DeploymentDirectory);

    I am getting object reference not set to instance of an object.

    Kindly let me know.




  2. Ivaylo
    Ivaylo avatar
    782 posts

    Posted 18 Sep 2015 Link to this post

    Hello Vishu,

    This code should be working:


    What error you are getting when you are executing the code, is it still the object reference? Can you please provide me with a sample test that execute on my end in order to get the behavior?

    Looking forward to hearing from you.

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