Domanda

Ho ricevuto questa eccezione quando si tenta di eseguire test di specificazione mspec con TD.NET.

------ Test started: Assembly: DesignRightWeb.Specs.dll ------

Error: Runner failure: System.Runtime.Serialization.SerializationException: Type is not         resolved for member 'Machine.Specifications.Runner.RunOptions,Machine.Specifications,     Version=0.3.0.0, Culture=neutral, PublicKeyToken=null'.
   at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityAttributes)
   at     Machine.Specifications.Runner.Impl.AppDomainRunner.CreateRunnerAndUnloadAppDomain(String     runMethod, AppDomain appDomain, Assembly assembly, Object[] args) in d:\BuildAgent-    01\work\340c36596c29db8\Source\Machine.Specifications\Runner\Impl\AppDomainRunner.cs:line     81
Test 'T:DesignRightWeb.Specs.given_a_string_calculator' failed: Type is not resolved     for member 'Machine.Specifications.Runner.RunOptions,Machine.Specifications,     Version=0.3.0.0, Culture=neutral, PublicKeyToken=null'.
    System.Runtime.Serialization.SerializationException: Type is not resolved for member 'Machine.Specifications.Runner.RunOptions,Machine.Specifications, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null'.
    at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityAttributes)
    at Machine.Specifications.Runner.Impl.AppDomainRunner.CreateRunnerAndUnloadAppDomain(String runMethod, AppDomain appDomain, Assembly assembly, Object[] args)
    at Machine.Specifications.Runner.Impl.AppDomainRunner.RunMember(Assembly assembly, MemberInfo member)
    at Machine.Specifications.TDNetRunner.SpecificationRunner.RunMember(ITestListener testListener, Assembly assembly, MemberInfo member)
    at TestDriven.TestRunner.AdaptorTestRunner.Run(ITestListener testListener, ITraceListener traceListener, String assemblyPath, String testPath)
    at TestDriven.TestRunner.ThreadTestRunner.Runner.Run()

0 passed, 1 failed, 0 skipped, took 1.12 seconds (MSpec).

Ho provato l'installazione MSpec retta dalla Github e installato anche utilizzando NuGet. Dopo di che - mentre riceve questa stessa eccezione - ho disinstallato TD.NET e ri-installato TD.NET. Continuando a ricevere questa eccezione.

Tutte le idee? Pensieri? Soluzioni?

È stato utile?

Soluzione

Potrebbe essere è necessario registrare il test corridore MSpec in TestDriven.NET? Dai un'occhiata a questo post per aiutare a:

http: // eduncan911. com / blog / registrazione-mspec-runners-per-TestDriven-net-on-Windows-x64.aspx

Altri suggerimenti

Se hai registrato il corridore TD.Net prima, (potrebbe essere necessario l'hacking alcuni Registry - vedere InstallTDNetRunner.bat come annullare) si prega di annullare la registrazione di esso.

Si raccomanda di eseguire TD.Net> = 2.24. Aggiungere il pacchetto NuGet per i test del progetto e passare per TD.Net. Il pacchetto NuGet contiene anche un corridore ReSharper aggiornato che si potrebbe desiderare di installare.

Se l'errore persiste ancora, è molto probabile che hanno una vecchia versione di MSpec riferimento da qualche parte. La vecchia versione è 0.3.0.0, mentre NuGet è attualmente a 0.4.7.0.

(mi permetto di aggiungere - per il momento avete inviato la tua domanda abbiamo un pacchetto NuGet aveva contribuito da qualcuno Tale pacchetto non conteneva il corridore TD.Net appropriata Il problema che hai descritto deve essere risolto ora che abbiamo un nuovo.. pacchetto NuGet contenente tutti i corridori.)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top