FB8 does not publish test results anymore (vstest.console)

Hello VSoft Team,

we are currently migrating from FinalBuilder7 (V7.0.0.3450) to FinalBuilder8 (V8.0.0.2281)
In a build project we use the “Run VSTest.Console” action with the option “Automatically publish results when running under Team Build”.
In one branch of the project we use FB8 and there the results are not published anymore. The FinalBuilder project was simply migrated by opening the version 7 file and saving it as version 8 file.

When looking at the log files of the build (TFS 2010), FinalBuilder7 says:

[Run VSTest.Console [ ListOfDLLs ]]
Running under Team Build. Obtaining Team Server details from environment.
Results will be published to Team Project XXX on http://XXX Build Name CI Main_XXX (Debug/x64)

Publish completed successfully. Test Results: mtm://XXX/Testing/testrun/open?id=31484.



FinalBuilder 8 says basically the same, except “Running under Team Build…” and then of course missing “Publish…”.
It seems that FB8 does not detect that it runs as a Team Build project - this could be a bug in the vstest.console action.


I also noticed that the “Include Project” action does not have the checkbox “Reload Environment Variables” anymore.
Since our vstest-action is executed in an included project, this might also be a cause of trouble.

Thanks for looking into this,
best regards
Florian

Hi Florian

The reload environment variables option on the include project actiont was removed as environment variables are always read again, however I suspect that might have been a mistake, as it woudn’t find new variables (which would be the case with TFS). I will look into this.


Actually, now that I think about it, the TFS environment variables would already exist even before we get to the Include project action, so the reload option is not the problem. Can you show the exact log output for the action? That would help determine what the settings are and what it’s doing.

Add a log variables action at the start of your FinalBuilder project (log all variables) and see whether the tfs environment variables are there :

_envTeamServer
_envTeamProject
_envTeamBuildId
_envBuildPlatform
_envBuildFlavor
_envDropFolder
_envSolutionRoot
_envWorkingDirectory

We no longer have a working TFS2010 environment to test on. To be honest, I’m surprised to hear of anyone still using it, considering how much better later versions are (particularly 2015 and 2017). FWIW, with FinalBuilder 9, we are going to drop support for any versions before TFS2015, and (for 2015) support for the xaml build process (which is gone in TFS2017).

Hello Vincent,

thanks for your reply.

I put the “Log Variables” action right at the very start of both FB7 and FB8 projects, and in addition right before the vstest.console action in the FB8-sub-project.
All of them print the _env variables you mentioned (even two more) with correct values; exemplary output from log-file:
_envbuildflavor = Debug
_envbuildplatform = x64
_envdropfolder = \bld-XXX\ContinuousIntegration\CI Main\CI Main_20171127.2
_envsolutionfile = d:\Builds\XXX\Sources\Builds\Shared\dummy.sln
_envsolutionfilelist = d:\Builds\XXX\Sources\Builds\Shared\dummy.sln
_envsolutionroot = d:\Builds\XXX\Builds\Shared
_envteambuildid = CI Main_20171127.2
_envteamproject = XXX
_envteamserver = http://tfs-XXX:8080/tfs/DefaultCollection
_envworkingdirectory = d:\Builds\XXX\CI Main


Thanks for pointing out about future developments. I hate those XAML builds anyway, PITA with custom build process templates… However, we will have to stick for a couple of months to them until we upgrade.

Looking forward to your reply,
best regards
Florian

Those variables look ok, what settings do you have on the action?

FB7 settings:
<img src=’{2}’ />
This generates following output:
[code][Run VSTest.Console [ <ListOfDLLs> ]]Running under Team Build. Obtaining Team Server details from environment.Results will be published to Team Project XXX on http://tfs-XXX/tfs/DefaultCollection, Build Name CI XXX_20171107.2 (Debug/x64)Starting Directory: d:\Builds\XXX\Parameters: <ListOfDLLs> /settings:“d:\Builds\XXX\Sources\Builds\Shared…\Shared\LocalRun.testsettings” /inisolation /platform:“x64” /logger:trx /logger:TfsPublisher;Collection=http://tfs-XXX/tfs/DefaultCollection;BuildName=“CI XXX_20171107.2”;TeamProject=XXX;Platform=x64;Flavor=DebugMicrosoft ® Test Execution Command Line Tool Version 14.0.25420.1Copyright © Microsoft Corporation. All rights reserved.Starting test execution, please wait…[/code]


Settings for FB8:
<img src=’{2}’ />
Output in the log file:
[code][Run VSTest.Console [ <ListOfDLLs> ]]Executing external process: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exeStarting Directory: d:\Builds\XXX\Parameters: <ListOfDLLs> /settings:“d:\Builds\XXX\CI Main\Sources\Builds\continuous integration…\Shared…\Shared\LocalRun.testsettings” /inisolation /platform:“x64” /logger:trxOutput from C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exeMicrosoft ® Test Execution Command Line Tool Version 15.0.26929.2Copyright © Microsoft Corporation. All rights reserved.Starting test execution, please wait…[/code]

Regards
Florian

Uhm, images are not shown; attempt 2:
FB7:

FB8:

Please see links for images:
FB7: https://img2.picload.org/image/drciorcw/fb7settings.png
FB8: https://img3.picload.org/image/drciorpi/fb8settings.png

I think I have found the problem, it’s a logic error introduced to fix another issue. I’m running a build with what I hope is a fix (unable to test on TFS2010), I’ll post a link here when it’s uploaded.

Hi Florian

Please try this build :

http://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800_2317.exe

Hi Vincent,

thanks for the build, results are now published again Florian

It’s the same as the most recent release build, but has the vstest fix and a couple of other minor fixes, should be fine for production. I expect we’ll be putting out another release in the next week or two as we’re working on some other issues at the moment