2015-07-20 2 views
0

Ma configuration est la suivante. XUnit runner (1.9.2) déclenche les tests générés à l'aide de SpecFlow. IISExpress 10 commence à singleton comme ceci:"Accédez à l'emplacement de lecture de violation" dans IISExpress 10 (dans webengine4.dll) avec Selenium IEDriver 12.6

_iisProcess = new Process { 
    StartInfo = { 
     FileName = Path.Combine(programFiles, @"IIS Express\iisexpress.exe") 
     } 
    }; 
var applicationPath = GetApplicationPath(); 
_iisProcess.StartInfo.Arguments = string.Format(
    "/path:{0} /port:{1} /systray:false /trace:e", 
    applicationPath, 
    IisPort); // so far 9090 
_iisProcess.Start(); 

IEDriverServer.exe Sélénium (2,46) configuré comme ceci:

_driver = new InternetExplorerDriver(
    new InternetExplorerOptions(){EnsureCleanSession = true}); 

La machine configurée comme par this guide. IEDriverServer.exe écoute le port 17923.

À certains points dans les tests, IISExpress échoue avec l'erreur «violation d'accès» (c0000005). Le test du système d'échec réel varie mais semble se produire lorsqu'il y a une interaction active de l'interface utilisateur. Il y a SignalR, contenu dynamique et autre. La signature Problème:

Problem Event Name: APPCRASH 
    Application Name: iisexpress.exe 
    Application Version: 10.0.10046.0 
    Application Timestamp: 55121079 
    Fault Module Name: webengine4.dll 
    Fault Module Version: 4.6.57.0 
    Fault Module Timestamp: 551b8b21 
    Exception Code: c0000005 
    Exception Offset: 00066ccf 
    OS Version: 6.3.9600.2.0.0.256.48 
    Locale ID: 1049 
    Additional Information 1: 5861 
    Additional Information 2: 5861822e1919d7c014bbb064c64908b2 
    Additional Information 3: a10f 
    Additional Information 4: a10ff7d2bb2516fdc753f9c34fc3b069 

Parfois, il échoue à un code comme celui-ci avec "OpenQA.Selenium.WebDriverTimeoutException: Expiration du délai après 30 secondes" à DefaultWait.Until

 IWait<IWebDriver> wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30.00)); 
     try 
     { 
      wait.Until(driver1 => ((IJavaScriptExecutor)driver).ExecuteScript("return document.readyState").Equals("complete")); 
     } 
     catch (InvalidOperationException ex) // js error { /*...*/ } 

IISExpress journal n'aide pas. Il n'écrit que quelques dernières requêtes et se termine:

Request started: "POST" http://localhost:9090/signalr/abort?transport=webSockets... 
Request ended: http://localhost:9090/signalr/connect?transport=webSockets... with HTTP status 101.0 
Request ended: http://localhost:9090/signalr/abort?transport=webSockets&clientProtocol=1.4.... with HTTP status 200.0 
WriteCompletedInline 
Action = 00000002 
Action = 00000000 
Request ended: http://localhost:9090/signalr/connect?transport=webSockets.... with HTTP status 101.0 
Request ended: http://localhost:9090/BotDetectCaptcha.ashx?get=image&c=SampleCaptcha&t=44c45e60afac46809bfce16e123b54a2 with HTTP status 200.0 

Cela ne sert à rien si les tests s'exécutent sous Administrateur. La même chose lorsque le coureur d'essai R # déclenche les tests.

Toutes vos pensées, aide serait très appréciée. Merci!

Répondre

0

Dans le cas où cela serait utile quelqu'un m'a aidé à résoudre le problème en réinstallant IIS Express. Fichier MSI IIS Express 8.0 peut être trouvé à here.