Receiving error "The directory name is invalid" when using MSTest Runner Task

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When executing an MSTest Runner it fails with the error "The directory name is invalid". Taking the command that is outputted to the log and running it from the command-line works fine.

03-Nov-2011 14:05:49 Starting task 'Service Unit Tests' of type 'com.atlassian.bamboo.plugin.dotnet:mstestRunner'
03-Nov-2011 14:05:49 Beginning to execute external process for build 'Build Plan - Build Service Layer'
... running command line: 
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe
/testcontainer:trunk\ServiceLayer\Test\QikID.Service.Rest.Test\bin\Debug\QikID.Service.Rest.Test.dll
/resultsfile:Trunk\ServiceLayer\Test\testresults.trx
... in: D:\bamboo-home\xml-data\build-dir\QI-QI-JOB1
03-Nov-2011 14:05:50 Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1
03-Nov-2011 14:05:50 Copyright (c) Microsoft Corporation. All rights reserved.
03-Nov-2011 14:05:50 
03-Nov-2011 14:05:50 Loading trunk\ServiceLayer\Test\QikID.Service.Rest.Test\bin\Debug\QikID.Service.Rest.Test.dll...
03-Nov-2011 14:05:50 trunk\ServiceLayer\Test\QikID.Service.Rest.Test\bin\Debug\QikID.Service.Rest.Test.dll
03-Nov-2011 14:05:50 The directory name is invalid.
03-Nov-2011 14:05:52 Parsing test results...
03-Nov-2011 14:05:52 Failing task since test cases were expected but none were found.
03-Nov-2011 14:05:52 Finished task 'QikID REST Service Unit Tests'

Cause

This error usually happens when the Bamboo Server is being run as a Windows Service and the Service is having permissions problems to access local paths.

Workaround

Based on this document: Running Bamboo service on Windows as the local user, if  Bamboo is running as a Windows service, make sure that a local user(not a SYSTEM user) runs  Bamboo. 

Last modified on Jul 11, 2013

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.