Questions tagged [specrun]

SpecRun is an integration test runner for SpecFlow.

101 questions
3
votes
1 answer

Why is my Specflow [AfterTestRun] hook called twice

[AfterTestRun] This hook for me is being called twice. My C# code is correct and at the end of each Scenario I am saving my results to a Concurrent Bag. Then I use the [AfterTestRun] hook to call the Concurrent Bag and save the data to a…
Code Rocker
  • 500
  • 4
  • 15
3
votes
1 answer

VS2015 specrun integration

I'm trying to debug tests in Visual Studio 2015, but I get the error: Configuration error: Invalid tool integration specified. Possible values: None, VS2010, VS2012, VS2013, TeamCity, TFS I have installed SpecFlow for Visual Studio 2015…
3
votes
1 answer

SpecFlow skips Scenarios if the one before it fails Assertion

I have a bunch of scenarios written in my feature file that have Assertions in them. If the First scenario fails an assertion, Specflow skips all the scenarios that follow after it. I would like for all my scenarios to continue to run even if one…
AKN
  • 163
  • 1
  • 10
3
votes
3 answers

Insert screenshots in SpecRun/SpecFlow test execution reports

I'm using SpecFlow with Selenium WebDriver and SpecRun as test runner to create and execute automated test cases and I'm looking for a solution to insert screenshots in the test execution report. I wrote a method to create screenshots after every…
LeeWay
  • 793
  • 3
  • 16
  • 28
2
votes
1 answer

SpecFlow - The argument type 'System.MarshalByRefObject' cannot be converted into parameter type 'TechTalk.SpecRun.Common.Logging.ITestLogger'

In visual studio 2019, I can build and run my specific test cases perfectly in test explorer. But I run from command line, its showing below error. Discovered 1 tests Thread#0: The argument type 'System.MarshalByRefObject' cannot be converted into…
2
votes
0 answers

SpecFlow+ Target value mismatch while running in parallel

This is a known issue(at least in .Net Core I guess). I'm attempting to make use of the SpecFlow+ targets functionality as described here. Once implemented in .srprofile, I can see a single test is split into two different copies in VisualStudio…
Easwar AB
  • 71
  • 1
  • 5
2
votes
1 answer

How to execute before and after test run only once in parallel execution of specflow

I have to run db scripts before and after test execution but if I mentioned in the Before test run it's running multiple times for every thread but I need to run only once in test execution means it's to be top of all threads Eg: Hooks…
sri
  • 21
  • 2
  • 7
2
votes
1 answer

Runsetting file NOT WORKING with SpecFlow+MSTest+SpecRun.Specflow

I checked almost all stack overflow and Microsoft documentation on how to read parameters from .runsettings file in MSTest and tried all the approaches but none worked for me. I am using .NETCore 2.2, VS 2019, Selenium, SpecFlow+ Runner. Does not…
born2Learn
  • 1,253
  • 5
  • 14
  • 25
2
votes
1 answer

Run Specflow Features in Parallel using Specrun

I have created 10 Specflow feature files, each having 5 Scenarios. So, 50 Scenarios or tests in total. When I run these tests using SpecRun in parallel (3 threads), 3 scenarios in each feature file gets executed at once, which is fine. I was using…
Easwar AB
  • 71
  • 1
  • 5
2
votes
1 answer

ChromeDriver and SpecRun Issue: Only one usage of each socket address (protocol/network address/port) is normally permitted

When running Selenium automated tests in C# through SpecRunner using ChromeDriver (especially when running in multiple threads), we keep intermittently seeing this exception: Unable to connect to the remote server --->…
2
votes
1 answer

How to run Specflow/Specrun feature files with dynamic values

I am very new to Specflow/Specrun and C# programming. I need help in fixing the issue I am facing. I have a Specrun feature file which queries database. Below is the code of the feature file: Scenario Outline: Ensure all rows are correctly inserted…
user1493004
  • 101
  • 2
  • 2
  • 6
2
votes
1 answer

Can i make specflow do one last thing even if it fails in the middle of the scenario?

Because im changing in my specflow scenario important configuration I would like my specflow scenario to reset the configuration everytime it finish the scenario, even if it fails in the middle. [AfterScenario] do the work only if it didnt fails,…
Matan
  • 21
  • 2
2
votes
1 answer

SpecRunner : Test Method getting called twice

I am using Spec Runner to run my test cases, the scenrios are getting called twice. What might be the issue? Please find the below scenario and test results attached ScenarioTestResults
2
votes
1 answer

How to fix failed tests count in teamcity for re-executed tests?

We are using TeamCity for Selenium tests execution with Specflow+Specrun, the problem is that TeamCity count re-executed tests. For example if some test failed for first time he will be re-executed two times more, in teamcity we will see that three…
2
votes
1 answer

Specflow - How to Make Pending test to not fail the whole test

Hi I'm using specflow for automating my Web test . From last few days i m getting Pending tests make the whole test in a fail mode rather then Making it pass. Previously it was passing the test suite if one or 2 pending tests found but from last…
vic
  • 217
  • 1
  • 7
  • 18
1
2 3 4 5 6 7