"Cannot find the specified testAssembly:" the project name is getting ommitted
I am getting this error even when I hard code the entire path from the volume to the file.
The YAML code looks like this:
- task: SpecFlowPlus@0
displayName: 'Generate the SpecFlow + LivingDocs reports for C.com'
inputs:
generatorSource: 'FeatureFolder'
projectFilePath: 'D:\Agent\_work\2\s\C.com'
testAssemblyFilePath: 'D:\Agent\_work\2\s\C.com\bin\Debug\net6.0\Company_com.dll'
projectName: 'Company.com site'
testExecutionJson: 'D:\Agent\_work\2\s\C.com\bin\Debug\net6.0\TestExecution.json'
projectLanguage: 'en'
bindingAssemblies: 'D:\Agent\_work\2\s\C.com\bin\Debug\net6.0\Company_com.dll'
output: 'FeatureData.json'
continueOnError: true
And here is the error with the stack trace info
##[error]Error: Command failed: dotnet "D:\Agent\_work\_tasks\SpecFlowPlus_32f3fe66-8bfc-476e-8e2c-9b4b59432ffa\0.6.964\CLI\LivingDoc.CLI.dll" test-assembly "bin\Debug\net6.0\Company_com.dll" --output-type JSON --test-execution-json "**\TestExecution.json" --binding-assemblies "bin\Debug\net6.0\Company_com.dll" --include-test-output "All" --output "D:\Agent\_work\2\s\76140\FeatureData.json" --project-name "Web site testing" --project-language "en"
Error: Cannot find the specified testAssembly: D:\Agent\_work\2\s\bin\Debug\net6.0\Company_com.dll
Error: Cannot find the specified testAssembly: D:\Agent\_work\2\s\bin\Debug\net6.0\Company_com.dll
at checkExecSyncError (child_process.js:629:11)
at Object.execSync (child_process.js:666:13)
at D:\Agent\_work\_tasks\SpecFlowPlus_32f3fe66-8bfc-476e-8e2c-9b4b59432ffa\0.6.964\index.js:138:46
at step (D:\Agent\_work\_tasks\SpecFlowPlus_32f3fe66-8bfc-476e-8e2c-9b4b59432ffa\0.6.964\index.js:44:23)
at Object.next (D:\Agent\_work\_tasks\SpecFlowPlus_32f3fe66-8bfc-476e-8e2c-9b4b59432ffa\0.6.964\index.js:25:53)
at D:\Agent\_work\_tasks\SpecFlowPlus_32f3fe66-8bfc-476e-8e2c-9b4b59432ffa\0.6.964\index.js:19:71
at new Promise (<anonymous>)
at __awaiter (D:\Agent\_work\_tasks\SpecFlowPlus_32f3fe66-8bfc-476e-8e2c-9b4b59432ffa\0.6.964\index.js:15:12)
at D:\Agent\_work\_tasks\SpecFlowPlus_32f3fe66-8bfc-476e-8e2c-9b4b59432ffa\0.6.964\index.js:77:12
at Object.<anonymous> (D:\Agent\_work\_tasks\SpecFlowPlus_32f3fe66-8bfc-476e-8e2c-9b4b59432ffa\0.6.964\index.js:172:3)
##[debug]Processed: ##vso[task.issue type=error;]Error: Command failed: dotnet "D:\Agent\_work\_tasks\SpecFlowPlus_32f3fe66-8bfc-476e-8e2c-9b4b59432ffa\0.6.964\CLI\LivingDoc.CLI.dll" test-assembly "bin\Debug\net6.0\Company_com.dll" --output-type JSON --test-execution-json "**\TestExecution.json" --binding-assemblies "bin\Debug\net6.0\Company_com.dll" --include-test-output "All" --output "D:\Agent\_work\2\s\76140\FeatureData.json" --project-name "Web site testing" --project-language "en"
Error: Cannot find the specified testAssembly: D:\Agent\_work\2\s\bin\Debug\net6.0\Company_com.dllat checkExecSyncError (child_process.js:629:11)
I've tried numerous ways of formulating the path to get around this and in every case it is omiting the project directory name in the path. This is a self hosted agent so I have access to the server in question and can see the path in question. The only odd thing That I am doing that might account for this, though I couldn't say why, is forcing the use of dotNet Core 6.0.
To do that I edited the LivingDoc.CLI.runtimeconfig.json as I wanted to run everything on the same .NET Core major version
{
"runtimeOptions": {
"tfm": "net6.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.1"
}
}
}
-
Follow up. I copied the erroring commnd into a cmd on the server and it runs successfully:
D:\somepath>dotnet "D:\Agent\_work\_tasks\SpecFlowPlus_32f3fe66-8bfc-476e-8e2c-9b4b59432ffa\0.6.964\CLI\LivingDoc.CLI.dll" test-assembly "bin\Debug\net6.0\Company_com.dll" --output-type JSON --test-execution-json "**\TestExecution.json" --binding-assemblies "bin\Debug\net6.0\Company_com.dll" --include-test-output "All" --output "D:\Agent\_work\2\s\76163\FeatureData.json" --project-name "Web site testing" --project-language "en"
0
Please sign in to leave a comment.
Comments
1 comment