2016-08-04 69 views

回答

1

是的。我創建了一個新的標準F#庫,並已經有以下引用補充說:

<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
<Reference Include="mscorlib" /> 
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 
    <Private>True</Private> 
</Reference> 
<Reference Include="System" /> 
<Reference Include="System.Core" /> 
<Reference Include="System.Numerics" /> 
<Reference Include="System.Windows.Forms" /> 

這Library1.fs文件:

namespace CodedUITestProject1 

open System 
open System.Collections.Generic 
open System.Text.RegularExpressions 
open System.Windows.Input 
open System.Windows.Forms 
open System.Drawing 
open Microsoft.VisualStudio.TestTools.UITesting 
open Microsoft.VisualStudio.TestTools.UnitTesting 
open Microsoft.VisualStudio.TestTools.UITest.Extension 

    [<CodedUITest>] 
    type CodedUITest1() = 
     [<TestMethod>] 
     member this.CodedUITestMethod1() = 
      Assert.AreEqual(true, true) 
      () 

     [<DefaultValue(false)>] 
     val mutable testContext: TestContext 

和它的工作對我來說:Test Explorer working

相關問題