Configuration of Allure report for selenium with C#, specflow tests - c#-4.0

I'm using Selenium with C#, specflow and NUnit 3 to create my automated tests. Now I am looking for reporting tool like Allure. Can anyone guide me, how to configure Allure report please?
Thanks,

Check https://www.nuget.org/packages/Specflow.Allure/
Make sure you're using NUnit 3 version which supports TextFixtureSetUp/TextFixtureTearDown (like 3.2), because SpecFlow uses old NUnit and this attributes became deprecated in newer NUnit versions.
Specflow.Allure currently supports SpecFlow 2.1 and will support 2.2 as soon as my PR will be approved.

Related

Specflow : Test scenario is not getting displayed in test explorer

When i add test scenario in feature file it is not getting displayed after build. in VS 2015.
I had the same issue . And when I upgraded my specflow to 3.0.213 , feature.cs and tests were not generated. Then I used this MSBUild example with latest specflow to generate feature.cs and tests in test explorer. It uses MSTest as test runner.

Add SpecFlow tests to .NET Core project in VSCode

I've created a .NET Core project and I'm using VSCode on Linux. I installed SpecFlow with dotnet add package SpecFlow but I don't think there is IDE integration yet. Can I use the SpecFlow nuget package from the command line to create a test?
SpecFlow 3.0 will have .NET Core support. A preview is currently available.
See blog post: https://specflow.org/2018/specflow-3-public-preview-now-available/
To generate the code-behind files we are using the MSBuild generation always for .NET Core. https://specflow.org/2019/generating-code-behind-files-using-msbuild/
Examples can be found here: https://github.com/techtalk/SpecFlow-Examples/tree/master/NETCore%20Examples
I'm afraid but you can't use specflow through command line on linux :(
link on GitHub source project.

Resharper output window not showing steps anymore

Recently we had a change to our Xunit and we upgraded to Xunit 2.0 and all projects to .NET 4.5. Before this change,when I ran the feature file, I remember seeing the steps on the output window (of Resharper unit test session) of a failed test and it would pinpoint where the test failed at. But now, it only shows what kind of error it is and no steps in the output pane.
Can anyone tell me how to get the steps back as it is very annoying and difficult to find out where the test failed.
Note: We are using specflow to write the tests and run them using Resharper. The version of Resharper I am using is 8.2.1000
Support for XUnit 2.0 does not exist in Specflow yet. There is an outstanding pull request, but it still has some issues I think. So I think your options are to revert to the previous version of XUnit or roll up your sleeves and contrbute to the open PR.

Is it possible to use Specflow with Resharper?

I have just added a specflow feature however the generated code is for NUnit. I would prefer to use Resharper to run the tests.
I installed specflow from NuGet. I did not install any runner projects.
Here is a sample of the generated .feature.cs
//
------------------------------------------------------------------------------ // <auto-generated> // This code was generated by SpecFlow (http://www.specflow.org/). // SpecFlow Version:1.9.0.77 // SpecFlow Generator Version:1.9.0.0 // Runtime Version:4.0.30319.18444 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //
------------------------------------------------------------------------------
#region Designer generated code
#pragma warning disable namespace Test.FeatureHanding {
using TechTalk.SpecFlow;
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("Set Filter")
By default, all SpecFlow tests are in NUnit! SpecFlow simply generates the tests from the plain text for you.
You simply have to click on the icon to the left of the test method declaration in the generated YourFeature.feature.cs file, or you Resharpers test explorer to find it.
I think there is a terminology misunderstanding here.
NUnit is a testing framework (others are xUnit, mbUnit, MSTest). NUnit comes with a test runner which can run unit tests written with the NUnit framework.
Resharper has a test runner which can run tests from many testing frameworks (all of the above frameworks I believe). There are other test runners available. Visual studio (2012+ I believe) come with a test runner which can run MSTest tests without a plugin. NCrunch can run tests from any of the frameworks, and xUnit and mbUnit probably have runners provided which can run tests written in those frameworks.
Once you have built your feature files then Resharper should find the tests that SpecFlow has generated.

Cucumber support for Aptana

I am using Aptana Studio 3, build: 3.0.6.201110251455 for developing ruby + cucumber web automation framework. Aptana has decent support for Ruby, but it does not support cucumber features files. I would need a .feature extention and support from Aptana.
Thanks in advance
I am running the latest version of Aptana (3.2.1) and it now has support for tab completion, and various other commands. However, I still don't have syntax highlighting. I submitted a bug. I'll report back when I find out more.
please check this out: https://github.com/aptana/cucumber.ruble
You may find it for useful

Resources