Friday, 15 April 2011

c# - How to see the files of WorkingDirectory of QTAGent -


I am running an automated test from MTM on a test agent controlled by a test controller. In my project folder, Bank Automation I have a folder called SQLQL and it contains a file named "EmployyeSearchQuery.sql". But when my project is from this data If Sql tries to read the file, it receives the following error.

Could not find a part of the path 'C: \ user \ user name% \ AppData \ local \ VSec \ sqq \ employee \ search. SQL '

I have the code:

  fileinfo file = new fileinfo (@ ".. .. .. .. .. .. \ Bankout \\ \" SQLScripts \ EmployeeSearchQuery.sql " ); String strRecQuery = file.OpenText (). ReadToEnd (); StrRecQuery = strRecQuery.Replace ("\ t", ""). ("\ N", ""). ("\ R", ""). Trim ();   

What do I want to do, I need to see the file on the path: 'C: \ user \ user name% \ AppData \ Local \ VSEQT'.Where can I enable it?

And the path is' C: \ user \ user name% \ AppData \ local \ VSEQT. "Changes every time or is it fixed? Is there a way we can change?

I looked at QTAgent.exe.config but there is no such way. Is my relative path correct?

If I understand you correctly, then you have added EmployeeSearchQuery.sql to your Visual Studio project and your property" copy in Output Set directory "to" always copy ", okay?

If so, that means your file will be copied to the build output directory.

If you need this file while you run your tests, then you have to assign it. Test Settings by using the file or [DeploymentItem] Using the attribute (especially if you apply this file for a specific test

This article will help you: (It is AC visual studio while describing the test running but the deployment process is the same if you MTM .

If you [DeploymentItem] attribute please check it :, it will save you a lot of time.

No comments:

Post a Comment