2017-02-28 11 views
1

レポートを作成していますが、手順は含まれていません(質問の最後にスクリーンショットを見てください)。手順はレポートに含まれていません

  1. 私はNUnit3、NUnitConsole、SpecflowとSpecflow.NUnit nugetパッケージを追加しましたVS15
  2. にClassLibrary1のプロジェクトを作成しました。
  3. 私はdefaul機能とステップ定義ファイルを追加しました。その後

、私は(第2 specflowフォルダから、最初のNUnitのフォルダから)CMDからこれらのコマンドを実行しました:

nunit3-console.exe --labels=All --out=TestResult.txt "--result=TestResult.xml;format=nunit2" D:\Projects\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll 

specflow.exe nunitexecutionreport D:\Projects\ClassLibrary1\ClassLibrary1\ClassLibrary1.csproj /out:MyResult.html 

私が見るように、ステップは、出力HTMLファイルに含まれていません...私は以前のバージョンでは動作していたことを覚えていて、「展開」のようなボタンを使った例を見ました。これは、正確なステップがシナリオで実行されたことを確認するのに役立ちます。 何が恋しいですか?

TestResult.txtがある

=> ClassLibrary1.SpecFlowFeature1Feature.AddTwoNumbers 
Given I have entered 50 into the calculator 
-> pending: StepDefinition1.GivenIHaveEnteredSomethingIntoTheCalculator(50) 
And I have entered 70 into the calculator 
-> skipped because of previous errors 
When I press add 
-> skipped because of previous errors 
Then the result should be 120 on the screen 
-> skipped because of previous errors 

TestResult.xmlあるよう

<?xml version="1.0" encoding="utf-8" standalone="no"?> 
<!--This file represents the results of running a test suite--> 
<test-results name="D:\Projects\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll" total="1" errors="0" failures="0" not-run="0" inconclusive="1" ignored="0" skipped="0" invalid="0" date="2017-02-28" time="12:37:46"> 
    <environment nunit-version="3.5.0.0" clr-version="4.0.30319.42000" os-version="Microsoft Windows NT 10.0.14393.0" platform="Win32NT" cwd="D:\Projects\ClassLibrary1\packages\NUnit.ConsoleRunner.3.6.0\tools" machine-name="DESKTOP-417JV6U" user="dom" user-domain="DESKTOP-417JV6U" /> 
    <culture-info current-culture="en-US" current-uiculture="en-US" /> 
    <test-suite type="Assembly" name="D:\Projects\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll" executed="True" result="Success" success="True" time="0.386" asserts="0"> 
    <properties> 
     <property name="_PID" value="25444" /> 
     <property name="_APPDOMAIN" value="domain-" /> 
    </properties> 
    <results> 
     <test-suite type="TestSuite" name="ClassLibrary1" executed="True" result="Success" success="True" time="0.379" asserts="0"> 
     <results> 
      <test-suite type="TestFixture" name="SpecFlowFeature1Feature" description="SpecFlowFeature1" executed="True" result="Success" success="True" time="0.378" asserts="0"> 
      <properties> 
       <property name="Description" value="SpecFlowFeature1" /> 
      </properties> 
      <results> 
       <test-case name="ClassLibrary1.SpecFlowFeature1Feature.AddTwoNumbers" description="Add two numbers" executed="True" result="Inconclusive" success="False" time="0.118" asserts="0"> 
       <categories> 
        <category name="mytag" /> 
       </categories> 
       <properties> 
        <property name="Description" value="Add two numbers" /> 
       </properties> 
       <reason> 
        <message><![CDATA[One or more step definitions are not implemented yet. 
    StepDefinition1.GivenIHaveEnteredSomethingIntoTheCalculator(50)]]></message> 
       </reason> 
       </test-case> 
      </results> 
      </test-suite> 
     </results> 
     </test-suite> 
    </results> 
    </test-suite> 
</test-results> 

出力HTMLに見える:あなたは機能の上で右クリックしてステップ定義を生成することができます Output html looks like

答えて

0

テキストを選択し、「ステップ定義の生成」を選択します

これはStepsクラスを生成しますが、NotImplementedExceptionをスローするスタブメソッドのみを持ちます。

enter image description here

+0

質問には関係ありません。 質問は、specflowレポートの生成についてです。 添付の画像を見ると、シナリオだけがあることがわかります。 私は、それぞれのシナリオの近くに 'show'リンクを提示することを前提としています。 – mdementev

関連する問題