Passing multiple test container assemblies to the MSTest action

Hi,

As part of a FinalBuilder project, I have a solution iterator which I use to build all unit test projects searching by the convention that all test projects will take the form *.Test.csproj. I then use a define fileset action to search for all output assemblies on the assumption that they will match bin\\*.Test.dll. This works well, and saves me manually tracking the test assemblies in a large solution.

However, I would also like to be able to run these test container assemblies with MSTest. Currently, I have MSTest in standalone mode running each assembly inside an iterate fileset action. This works, but leads to a separate test result file (.trx) for each test assembly.

I'd like to be able to specify the entire fileset as input to the MSTest action's ability to take multiple test containers, so that I get a single trx file, as I do when I use Run All Tests in Solution in VS2010. My attempts to do this have so far lead to the concatenated contents of the fileset to be sent as the parameter to a single run of MSTest, which causes MSTest to fail with invalid arguments.

Can this be done?

I'm using .NET 4.0 and FinalBuilder 7.0.0.983

Hi

It appears that the MSTest action would not accept a CRLF delimited list of test assemblies to execute (doing so results in the Invalid Arguments error).

I have fixed this in the following build:
https://www.finalbuilder.com/downloads/finalbuilder/aex6/FB700_1046.exe

Once you install the new build, you can use the FileSet to Variable action to assign your test assembly list to a variable. Make sure that you set quoting to None and set the separator value to CRLF. Now you can simply pass this variable to the MSTest action as the test source.

Let me know if you have any problems with this.

Regards,
Steve

Thanks, the provided build has allowed me to pass in the fileset variable as described.

I’m running 7.0.0.993 and this still looked broken. Is there an easy workaround? Will this fix reach the production/auto update version soon? We’d like to use the built in support for MSTest, but I’m open to any solutions really (outside of a custom build - we need to easily deploy this for 300+ people).

Details: When I try the define FileSet -> Fileset -> Variable -> Run MSTest it initially worked well (by using " %FileSetVar% instead of just %FileSetVar%). When I closed FB and reloaded the solution it still seemed to run, however even after all 3 steps completed the FB guy just kept on running - run, pause, stop and kill were all disabled. In short it was pretty hosed and had to closed and reopened before anything could be changed or re-run - I can send a test FB file if it would help.

Thanks,

Adam

Hi Adam

The fix went into build 1046, and the current release build is 1065 so it is already there.

Can this fix be applied to v6.3?
I currently have build 2240, which I downloaded from the forum, to deal with another issue, but there’s no way to put a fileset in the assemblies list of the MSTest action. I don’t understand why the action does not simply accept a file set.

I have backported the fix to FB6 : https://www.finalbuilder.com/downloads/finalbuilder/630/FB630_2241.exe

Not all actions support FileSets because filesets were introduced after many of the actions were written. We do periodically go through actions looking for places where we can add Fileset support (we added a bunch for FB7), I’ll put this one on the todo list for next time we look at this.