我有一個MVC3 web應用程序,它已經發展到我想開始自動化一些功能測試的程度。所以,我一直在嘗試將編碼UI測試添加到我將單元測試放入的同一個項目中。只有沮喪。如何針對Windows Azure SDK運行編碼UI測試v1.4
我已經能夠記錄一系列簡單的步驟:登錄到應用程序。
我能夠生成代碼,我可以在名爲UIMap.Designer.cs的文件中看到生成的代碼。這個類的一個實例被實例化,並且測試方法在一個名爲LoginTest.cs的文件中被調用。
當我嘗試在[TestMethod的]在LoginTest.cs右鍵單擊並選擇運行測試,我最初收到以下錯誤:
Unable to load the test container 'C:...\WebRole.Tests.dll' or one of its dependencies. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
所以,我翻從本地複製下面的參考=假爲真:
- Microsoft.VisualStudio.TestTools.UITesting
- Microsoft.VisualStudio.TestTools.UITest.Extension
- Microsoft.Visua lStudio.QualityTools.CodedUITestFramework
現在,當我運行測試,我得到以下輸出:
Testing started:
Total tests: 1, filtered: 1
No tests found.
Duration : 94.9989452249951
瀏覽器實例未啓動。 Azure Compute和Azure存儲模擬器都不啓動。該應用程序未被打包和部署。總之,當我運行應用程序時,沒有發生任何事情。所以,我對UI測試如何運行感到困惑,因爲Azure模擬器環境沒有運行。
要解決這個問題,我試着打開VS2010的兩個實例。首先,我像往常一樣運行應用程序以運行Azure模擬器並部署應用程序。第二,我運行了CodedUITest方法。相同的結果。
現在,我卡住了。是否有其他人能夠針對Azure SDK v1.4提供的Azure模擬器運行編碼UI測試?