繁体   English   中英

如何在VS 2015中更改规格流程的测试执行的默认时间

[英]How to change the default time given to a test execution for spec flow in VS 2015

因此,我正在使用C#和规范流在VS 2015上执行Web自动化测试,现在此测试通常需要1分钟以上的时间来执行。

因此,由于一个问题,我现在面临两个问题

  1. 我正在测试场景中搜索某个元素,如果在一分钟的时间范围内未找到该元素,则测试将失败并退出(该一分钟的时间范围,我认为这是在规格流程中默认设置的)

  2. 如果在1分钟的时间范围内以某种方式找到了该元素,并且测试得以成功执行,我仍然会收到一条错误消息,即已跳过完整的测试(因为它没有在1分钟的时间范围内完成)

这是我的default.srprofile文件::::::::

<?xml version="1.0" encoding="utf-8"?>
<TestProfile xmlns="http://www.specflow.org/schemas/plus/TestProfile/1.5">
  <Settings projectName="PlentyOfFish(SpecFlow)" projectId="{e08ce6d1-5624-4562-bedf-42e1806c0c72}" />
  <Execution stopAfterFailures="1" testThreadCount="1" testSchedulingMode="Sequential" />
  <!-- For collecting by a SpecRun server update and enable the following element. For using the 
      collected statistics, set testSchedulingMode="Adaptive" attribute on the <Execution> element.
    <Server serverUrl="http://specrunserver:6365" publishResults="true" />
  -->
  <TestAssemblyPaths>
    <TestAssemblyPath>PlentyOfFish(SpecFlow).dll</TestAssemblyPath>
  </TestAssemblyPaths>
  <DeploymentTransformation>
    <Steps>
      <!-- sample config transform to change the connection string-->
      <!--<ConfigFileTransformation configFile="App.config">
        <Transformation>
          <![CDATA[<?xml version="1.0" encoding="utf-8"?>
                            <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
                <connectionStrings>
                  <add name="MyDatabase" connectionString="Data Source=.;Initial Catalog=MyDatabaseForTesting;Integrated Security=True" 
                       xdt:Locator="Match(name)" xdt:Transform="SetAttributes(connectionString)" />
                </connectionStrings>
                            </configuration>
                        ]]>
        </Transformation>
      </ConfigFileTransformation>-->
    </Steps>
  </DeploymentTransformation>
</TestProfile>

这是错误的摘要https://www.screencast.com/t/vZXJhkjMt

突出我的第一期

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM