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

Getting deployment directory when executing through Nunit

1 Answer 129 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
VVP
Top achievements
Rank 2
VVP asked on 15 Sep 2015, 10:26 AM

Hi All,

I was following this link :http://docs.telerik.com/teststudio/testing-framework/using-nunit 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.

 

Thanks,

VVP

1 Answer, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 18 Sep 2015, 09:05 AM
Hello Vishu,

This code should be working:

this.ExecutionContext.DeploymentDirectory;

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.

Regards,
Ivaylo
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
VVP
Top achievements
Rank 2
Answers by
Ivaylo
Telerik team
Share this question
or