question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test Agent not using ResultsDirectory in .runsettings file

See original GitHub issue

We’re using a .runsettings file with the ‘Visual Studio Test using Test Agent’ build task:

<RunSettings> <RunConfiguration> <ResultsDirectory>C:\TestRuns</ResultsDirectory> <TargetPlatform>x64</TargetPlatform> <TargetFrameworkVersion>Framework45</TargetFrameworkVersion> </RunConfiguration> </RunSettings>

We expect Test Runs to use the C:\TestRuns directory however it is using the %Temp% directory instead.

It looks like the .runsettings file was used based on the fact that setting the TargetPlatform to ‘x64’ was apparently effective. Also, using the same .runsettings locally in Visual Studio configured the directories as expected to “C:\TestRuns”.

Is there something missing to be configured on the Test Agent or task?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
jibalcommented, Oct 15, 2018

This behavior is by design.

That response makes no sense. There’s a property called ResultsDirectory and it’s documented as being where the test results go. Therefore it cannot be “by design” that they go somewhere else.

Any specific reason why you are interested in having a specific results directory location?

This sort of question is so annoying … there are numerous well-known reasons why people want to keep generated files out of their source folders.

0reactions
cjfarrellycommented, Nov 5, 2018

I was able to set the Results directory by adding an “Override TestRun Parameters” to “ResultsDirectory=.\TestResults”. This created the TestResults directory in the directory above the Build_SourcesDirectory.

I’m not sure how this could possibly work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test Agent not using ResultsDirectory in .runsettings file #1207
We're using a .runsettings file with the 'Visual Studio Test using Test Agent' build task: C:\TestRuns x64 Fra...
Read more >
Visual Studio Team Services Test Agent not using ...
We want to configure the Test Run directory paths when running unit tests in the 'Visual Studio Test using Test Agent' build task....
Read more >
Configure unit tests by using a .runsettings file - Microsoft Learn
Learn how to use the .runsettings file in Visual Studio to configure unit tests that are run from the command line, from the...
Read more >
Visual Studio Test Task not using custom test.runsettings file
When using the latest version of the VS Test Task and configuring a custom test.runsettings file ( We only want to set an...
Read more >
Is 'SpecRun adapter' in *.runsettings file support <SettingsFile>?
Because of this, now i'm using a .runsettings file instead of .testsettings file. ... name' BuildServer is not redirecting the tests to my...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found