vendredi 28 août 2015

MSTest 2015/2013 Hanging

I am trying to get some unit tests to run on a build server and when MSTest is called from the command line it goes over the [Ignored] tests, and on the first test it sits and hangs with no output.

I attached a debugger and decompiled MSTest and it seems to get stuck in Microsoft.VisualStudio.TestTools.CommandLine RunCommand : Command

public override CommandResult Execute(TmiAdapter tmiAdapter)
{
  new ResultsEventListener(this, CommandFactory.Tmi).Initialize();
  Executor.Output.WriteInformation((string) Messages.CommandLine_StartExecution, MessageType.Status);
  CommandResult commandResult;
  try
  {
    commandResult = tmiAdapter.Run(this);
    switch (commandResult)
    {
      case CommandResult.TmiNoTestToRun:
        Executor.Output.WriteInformation((string) Messages.CommandLine_NoTestsToExecute, MessageType.Warning);
        break;
      case CommandResult.Success:
      case CommandResult.BrokenLinksFound:
        this.m_autoEvent.WaitOne();
        if (!TmiAdapter.RunPassed(this))
          commandResult = CommandResult.TmiRunFailed;
        string resultsFileForRun = TmiAdapter.GetResultsFileForRun(this.RunId);
        if (!string.IsNullOrEmpty(resultsFileForRun))
          Executor.ResultManagerInstance.AddResultsGeneralInfoPair((string) Messages.CommandLine_ResultsFileLogged, resultsFileForRun);
        Executor.ResultManagerInstance.AddResultsGeneralInfoPair((string) Messages.CommandLine_RunConfigurationUsed, tmiAdapter.RunConfig.Name);
        Executor.ResultManagerInstance.ShowResultsSummary(TmiAdapter.GetTestRunOutcome(this.RunId));
        Executor.ResultManagerInstance.ShowAllRunErrors();
        break;
    }
  }
  catch (CommandLineException ex)
  {
    this.Error = ex.Error;
    commandResult = ex.Result;
  }
  return commandResult;
}

On this line this.m_autoEvent.WaitOne();

Aucun commentaire:

Enregistrer un commentaire