specflow

SpecFlow + Selenium2 + ASP.NET MVC + TeamCity Not Working

被刻印的时光 ゝ 提交于 2020-01-24 15:05:09
问题 I have some SpecFlow features which are using Selenium 2 to automate some UI testing of an ASP.NET MVC 3 application. When I run these locally, it runs fine and the tests pass. Once committing my changes to Git and pushing the commits to our remote repository for our TeamCity instance to pick up, the tests run and take a hell of a lot longer, only to fail with the following. Test(s) failed. OpenQA.Selenium.WebDriverException : No response from server for url http://localhost:7055/hub/session

SpecFlow + Selenium2 + ASP.NET MVC + TeamCity Not Working

只谈情不闲聊 提交于 2020-01-24 15:04:05
问题 I have some SpecFlow features which are using Selenium 2 to automate some UI testing of an ASP.NET MVC 3 application. When I run these locally, it runs fine and the tests pass. Once committing my changes to Git and pushing the commits to our remote repository for our TeamCity instance to pick up, the tests run and take a hell of a lot longer, only to fail with the following. Test(s) failed. OpenQA.Selenium.WebDriverException : No response from server for url http://localhost:7055/hub/session

Selenium .NET core 2.2 published project exe not running even on Windows x64

不羁岁月 提交于 2020-01-24 12:12:38
问题 When I build and publish project, the exe generated in the Published folder doesn't Open then closes within a sec. Can anyone help me to resolve the error ? When I ran the exe from CMD line I am getting this error. cd ..Path_to_Project\WebShopTestAutomation dotnet restore dotnet build dotnet test An assembly specified in the application dependencies manifest (WebShopTestAutomation.deps.json) has already been found but with a different file extension. The full project is here. Please read the

Selenium .NET core 2.2 published project exe not running even on Windows x64

浪子不回头ぞ 提交于 2020-01-24 12:12:25
问题 When I build and publish project, the exe generated in the Published folder doesn't Open then closes within a sec. Can anyone help me to resolve the error ? When I ran the exe from CMD line I am getting this error. cd ..Path_to_Project\WebShopTestAutomation dotnet restore dotnet build dotnet test An assembly specified in the application dependencies manifest (WebShopTestAutomation.deps.json) has already been found but with a different file extension. The full project is here. Please read the

How can I repeat steps in a Specflow Scenario Outline

六眼飞鱼酱① 提交于 2020-01-23 06:13:35
问题 In a nutshell, what I need is to create a Scenario Outline with a step that is repeatable without having to type it in using multiple AND's as I am currently doing below: Scenario Outline: outline Given I am a user When I enter <x> as an amount And I enter <x2> as an amount Then the result should be <result> Scenarios: |x|x2|result| |1|2 |3 | |1|0 |1 | However, I would like to do something like the following: Scenario Outline: outline Given I am a user When I enter <Repeat: x> as an amount

How do specflow features link to unit tests in asp.net webforms projects?

与世无争的帅哥 提交于 2020-01-17 13:04:03
问题 For example if I write Add A customer feature which might go like this: Scenario: Add A customer Given I am on the customer page When I enter login name then I press Add And I should see the newly added customer confirmation message I start to write the code in watin to open the browser and go to the customer page. Which doesn't exist at this point. The questions are: 1) do I then jump into unit tests and write a unit test for the page that doesn't exist? in MVC this would be a controller but

How do you fix Specflow “<unknown project>” issue in Visual Studio

家住魔仙堡 提交于 2020-01-16 13:10:13
问题 Background I have been working on a project and noticed that one of my Specflow Scenarios needed updating. I updated the Specflow Scenario by splitting it into two different scenarios (one for an invalid test and one for a valid test). After this I then regenerated the feature.cs file, cleaned and rebuilt the solution. (I am using Microsoft Visual Studio Enterprise 2019 Version 16.4.1) Issue This is when the "unknown project" appeared in my Test Explorer that consists of one test... the one I

Why are scenario outlines shown as 'External' in the VS 2012 Test Explorer?

徘徊边缘 提交于 2020-01-13 08:56:06
问题 I have a scenario outline (a.k.a scenario template) and I wish to list my tests using the VS 2012's Test Explorer. The default test grouping is done by the "Project" name - if I stick to it, my tests coming from scenario outlines are in the group "External" and not under the group of my project. Why is this and is there a solution/workaround to it? My scenario is that I'd like to run all of my tests for a given project using the Test Explorer. Setting the same trait for all of them is silly

How to teach SpecFlow to add additional NUnit attributes to my test class

南笙酒味 提交于 2020-01-12 07:45:08
问题 SpecFlow is great - and it helps us very much to do proper integration testing. One thing I was wondering is whether there's a way to tell SpecFlow to add additional NUnit attributes to the test class it creates in the feature code-behind file. Right now, my test class gets generated something like this: [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.8.1.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit

ATDD versus BDD and the proper use of a framework

南楼画角 提交于 2020-01-11 15:26:18
问题 I am just getting into the concept of BDD and have listened to Scott Bellware's talk with the Herding Code guys. I have been playing around with SpecFlow some and like it pretty well. I understand the distinction between ATDD and TDD as described in the blog post Classifying BDD Tools (Unit-Test-Driven vs. Acceptance Test Driven) and a bit of BDD history, but that leads me to a question. As described, isn't using a BDD tool (such as MSpec) just another unit testing framework? It seems to me