1

I have installed the following NuGets : Specflow.Nunit,specflow ,Specrun.Nunit along with NUnit 2.6.3. I am trying to execute runtests.cmd(automatically generated by specrun.nunit) but I am getting the following error :

TechTalk.SpecRun.Framework.SpecRunException: At least one test thread aborted. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Void TechTalk.SpecRun.SpecRunner.Initialize()'. My default.srprofile contains :

  <?xml version="1.0" encoding="utf-8"?>
    <TestProfile xmlns="http://www.specrun.com/schemas/2011/09/TestProfile">
      <Settings projectName="<PROJECTNAME>" projectId="{------}" />
      <Execution stopAfterFailures="3" testThreadCount="2" 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>projectname.dll</TestAssemblyPath>
      </TestAssemblyPaths>
      <DeploymentTransformation>
        <Steps>`enter code here`
          <!-- 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>

Also on the VS Output window I am getting this error : Could not load file or assembly 'TechTalk.SpecRun, Version=1.3.0.76, Culture=neutral, PublicKeyToken=d0fc5cc18b3b389b' or one of its dependencies. The system cannot find the file specified. Can someone please help me with this ?

NRT
  • 125
  • 2
  • 11
  • I think the selenium and bdd tags are unnecessary here, no selenium or bdd experts are likely to be able to help with this specrun specific issue – Sam Holder Oct 14 '16 at 13:08
  • Could you post the exact versions of your NuGet packages and some of your test code? – Andreas Willich Oct 14 '16 at 13:26
  • @AndreasWillich I was able to solve it there were some conflicts in the versions. I am now able to run scenarios in parallel. Can we run feature files in parallel ? As of now I have many feature files and the threads are picking up scenarios in random. But I want the threads to execute features in parallel. Also I am using specRun evaluation version. Is there any days constraint or its just the delay which is intoduced? – NRT Oct 17 '16 at 05:19
  • @NRT: Why do you want to execute the features in parallel? A feature is a set of scenarios. What makes the difference between running a feature in parallel or running all scenarios in it in parallel? Evaluation version is fully functional. It only adds the delay at the start of the exection. But best we discuss this on the SpecFlow+ board: https://groups.google.com/forum/#!forum/specrun – Andreas Willich Oct 20 '16 at 08:55

1 Answers1

0

You would to change this strings:

      <RelocateConfigurationFile target="CustomConfig.{TestThreadId}.config" />
      <ConfigFileTransformation configFile="App.config">

Full answer: https://github.com/techtalk/SpecFlow/issues/954