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.
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).
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.
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.
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.
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.