Quando eseguo i miei Test unità, tutti i test passano, ma invece di "Esegui test eseguito correttamente" o qualunque sia il messaggio di esito positivo, viene visualizzato "Errore esecuzione test" nella barra piccola che indica quanti dei miei test sono passati, anche se tutti i miei test sono passati.Errori di esecuzione test con MSTest in VS2010
quando clicco sul testo, mi sono preso ad una pagina che mi dice le seguenti due cose sono accadute:
Warning: conflict during test run deployment: deployment item '[...]\Booking.Web.dll' directly or indirectly referenced by the test container [...]\Booking.Web.Tests.dll cannot be deployed to 'Booking.Web.dll' because otherwise the file '[...]\Booking.Web.dll' would override deployment item '[...]\Booking.Web.dll' directly or indirectly referenced by '[...]\Booking.Web.Tests.dll'
Error: Cannot initialize the ASP.NET project 'Booking.Web' Exception was thrown: The website could not be configured correctly; getting ASP.NET proccess information failed. Requesting ' http://localhost:54131/VSEnterpriseHelper.axd ' returned an error: The remote server returned an error: (500) Internal Server Error.
Non capisco la metà di quello che sta lamentando. Come faccio a sbarazzarmi di questi errori?
(E per riferimento: Booking.Web è un progetto ASP.NET MVC 2, Booking.Web.Tests è un progetto di test, [...] è il percorso completo locale per i progetti nel mio ambiente, nella maggior parte dei casi sopra alla cartella/bin/debug/all'interno del progetto Booking.Web)
Aggiornamento: Come richiesto, ho cercato più informazioni nel Visualizzatore eventi. Ecco cosa ho trovato:
3008 A configuration error has occurred.
5/8/2010 2:26:15 AM
5/8/2010 12:26:15 AM
4ffbe9180c3d4c02adb9ac4d61dd0928
1
1
0
4484bbf4-1-129177519750954331
Full
/
D:\...\Booking.Web\
AASLOEG1876
WebDev.WebServer40.EXE
Aasloeg\Tomas
ConfigurationErrorsException
Could not load file or assembly 'Ninject.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=79764a4ef1548af1' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) at
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) at
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() at
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) at
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) at
...stack trace in absurdum.
Riferimento a un progetto ASP.NET in una prova di unità è quasi sempre una cattiva idea. –
OK ... Quindi come dovrei refactoring per uscire da questo? –
Refferenziare il progetto ASP.NET MVC in un test di unità è una pratica comune. Altrimenti come verificherai le azioni del controller? –