Тёмный
No video :(

Elegant Acceptance Testing in .NET with SpecFlow 

Nick Chapsas
Подписаться 300 тыс.
Просмотров 28 тыс.
50% 1

Check out SpecFlow: go.specflow.org...
Subscribe: bit.ly/ChapsasSub
Become a Patreon and get source code access: / nickchapsas
This video was sponsored by SpecFlow
Hello everybody I'm Nick and in this video I will show you how you can start writing elegant acceptance tests for your .NET applications using SpecFlow. SpecFlow is an amazing tool, primarily used to BDD but it is also a great tool to use for Acceptance Testing. It is by far the most advanced tool for such purpose in the .NET ecosystem and it's something I am personally using.
Specflow plugin for Rider: plugins.jetbra...
Don't forget to comment, like and subscribe :)
Social Media:
Follow me on GitHub: bit.ly/ChapsasG...
Follow me on Twitter: bit.ly/ChapsasT...
Connect on LinkedIn: bit.ly/ChapsasL...
#dotnet #bdd #acceptancetests

Опубликовано:

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 51   
@justinmarshall5891
@justinmarshall5891 Год назад
Thankyou Nick Chapsas and Specflow for demystifying the interesting topic of Acceptance Testing in .NET
@crisu85
@crisu85 3 года назад
I didn't knew about Fluent Docker, love it
@nickwong9649
@nickwong9649 Год назад
My team has some usage on specflow as well, ultimate goal is to let someone else write the test, but so far are still maintained by developers themselves. My biggest concern/problem is using of verbal sentence and attempt to map it back to the code implementation is very difficult, especially the system is complex enough. Everyone describe the test/steps slightly differently. Some may think your 'given' should not be written in that way, some may think you can describe your 'when' better. Even the same guy who write the description can describe the same scenario steps in a totally different way later when he come back. This is just an extra layer of human language to code mapping which will never be consistent and will never be standardized and you have to spend a lot of time finding whether the step you want in your mind has been implemented by someone already or not. Now, if you find something similar exist, you still need to check if the implementation is just the one you need or not. If not? Then people tend to define some given-when-then in a similar but slightly different way, to just meet their own need. Why not parameterize it? Yes, it can, but this breaks all existing tests, sometimes even across test scenarios if it is some common steps, and no one will risk to do that.
@HB-vt2dy
@HB-vt2dy Месяц назад
Yeah it needs some coordination and team agreements how to work with it. Please check the test pyramid. Unit tests should be written with unit test tools. BDD/Cucumber/Specflow should be used for component or high-level acceptance tests. They should reflect the user perspective. So the organization of Specflow Tests should follow the structure of requirements or business description of the application.
@HuntsWorkshop
@HuntsWorkshop 3 года назад
Hooks line 40 is killing me Nick lol since You have me 'hooked' on 1 dot per line formatting. .Build().Start(); Awesome video as always man!
@daa82
@daa82 2 года назад
Great video Nick!
@cyrilc189
@cyrilc189 2 года назад
2:13 Lol.. I felt your pain when you complained about the lack of a dark theme. Dark themes for the win. This should be a must for all modern UIs.
@ArchLordTT
@ArchLordTT 3 года назад
Nick, thx for greatest videos. I'm totally in love with BDD, but have some troubles with implementing it in .NET.
@petropzqi
@petropzqi 7 месяцев назад
Gold
@HenriqueSantos-gv4wr
@HenriqueSantos-gv4wr 9 месяцев назад
Firstly, excellent video Nick. I was unsure about how the HttpClient is being used, as it seems that before each scenario we are instantiating a new HttpClient. This can be harmful when occupying server ports. This way we guarantee a single instance for all tests?
@marcinsiennicki7451
@marcinsiennicki7451 3 года назад
Hi Nick great video. Could you write something about your path to learning specflow and acceptance tests?
@AlanDarkworld
@AlanDarkworld 3 года назад
I completely understand the need to test a system from an external / user perspective. But I fail to see the value in all of the prose and the artificial given/when/then separation. It just causes headaches with contexts and passing over values (as opposed to local variables in a unit/integration test). Also, the "features" file is just prose, it tells you nothing about what is actually being executed. It's a glorified comment. Where's the benefit?
@nickchapsas
@nickchapsas 3 года назад
The benefit is that it makes it very clear to see how the system is supposed to be behaving. Once written, you don't need to dive into any C# code to see how things should work and how your solution should be coming together. SpecFlow also makes it very easy for everyone to see by using the LivingDoc feature. It also enables ATDD, which is how I'm personally using it. Here is how it works in my case. All the features are written by product people, either product managers or product owners. Then when I'm starting to develop that feature, I first implement the feature file in the solution and create the bindings and then I build the feature to satifsy the test. If you can train your team to be on that level then it makes it so incredibly easy to build the right thing. It's not for everyone but it can really work.
@pilotboba
@pilotboba 3 года назад
One big benefit is that Business Analysts or Testers or Product Owners, etc (ie non devs) can learn gerkin and write these scenarios for you. Those acceptance tests can drive your development. Another great example of this is fitnesse. Which lets you write acceptance tests in a web UI and run them right from there.
@talmcmahon836
@talmcmahon836 3 года назад
I Use Specflow/Gherkin for 2 primary reasons. 1) Young developers can't always organize their thoughts/code into clear an concise pieces and the side effect of using Gherkin is that they do start thinking that way. 2) After 20 years in software development, it is abundantly clear to me that documentation about what specific business rules and how the software is exercising those rules is the last thing on anyone's list of things to do. Using Specflow and Gherkin as part of your testing regime gives the built in bonus of having a nearly human readable set of documentation packaged along with your codebase. There are even tools that will take the Gherkin and turn it into a "pretty" document.
@PeterManger
@PeterManger 3 года назад
I had to pause and stop laughing when the bright screen hits...
@matthewblott
@matthewblott 3 года назад
Outstanding video.
@LonliLokli
@LonliLokli 3 года назад
Great video, thanks for creating! But lines of code are too heavy, integration tests with mocking repository is simpler as for me.
@SelmirAljic
@SelmirAljic 3 года назад
I’m interested in how you would write acceptance test for a GUI application. In my previous company they started a headless version of the app and injected the registered services in the tests, do you think there’s a better approach?
@11r3start11
@11r3start11 3 года назад
great videos! But watching your API-testing videos I’m always wondering why don’t you use TestClient (which will run a real API in-memory) ?
@nickchapsas
@nickchapsas 3 года назад
It will run a real api in memory but that is not the experience that your consumers will have. It is “most likely” to perform exactly the same but it’s not guaranteed when networking is involved. TestClient is great for integration tests but I would never use it for acceptance tests
@nik6920
@nik6920 3 года назад
Unit-tests and E2E testing are much easier and take less time to create new tests
@PeteHannon
@PeteHannon 3 года назад
Those port numbers though... 😁
@arturrjXXXXXXXX
@arturrjXXXXXXXX 3 года назад
Hi Nick! TOP video! Where Do I found the sources for this video?
@matthewrossee
@matthewrossee 2 месяца назад
So what's the difference compared to end-to-end testing?
@sas-tube
@sas-tube 2 года назад
In my case not working Ductus cannot find the Dockerfile
@amazotv8382
@amazotv8382 Год назад
Hi Nick do you have the same tutorial available using restsharp?kindly give some guidance on using specflow with restsharp and xunit
@frotes
@frotes 3 года назад
Great video, especially the part with docker included. I often hear many terms to describe different layers or scopes for tests such as unit, integration, end to end, regression, functional, behavioral, acceptance. How do you go about reconciling all these or what are the nuisances between some that seem the same?
@mortware
@mortware 2 года назад
Hi Nick - I'm also using Rider, and I seem to have a problem with the Selenium ChromeDriver process still running after the tests have finished. I have to kill them manually from the command line before I can run them again. Tested it in VS2022 and it kill the process properly after closing the window. Any ideas?
@clearlyunwell
@clearlyunwell 3 года назад
👍
@andrenec
@andrenec 3 года назад
Thank you for this great video. Would you like please to share you dockerfile with us?
@paulmouatib9999
@paulmouatib9999 3 года назад
How much does Specflow cost?
@nickchapsas
@nickchapsas 3 года назад
Specflow is free and all the previously "paid" features are also free now
@paulmouatib9999
@paulmouatib9999 3 года назад
@@nickchapsas Nice :) I may consider it in my future projects for my customers. Thx a lot! I didn't knew this framework
@jankowalski2652
@jankowalski2652 2 года назад
Did you created table in gurkin by hand or you use some tool?
@Sambafrosch
@Sambafrosch 3 года назад
I'm not able to run the test scenarios from within the feature file, only from the test explorer. What do I miss?
@nickchapsas
@nickchapsas 3 года назад
You can run them from the feature file as well and also debug them. You just need to have the extension/plugin installed
@Sambafrosch
@Sambafrosch 3 года назад
@@nickchapsas Thanks for your response. I have the SpecFlow extension installed, Version 2019.0.91.54171, but there is no green triangle shown. I use VS Professional.
@nickchapsas
@nickchapsas 3 года назад
@@Sambafrosch I only use JerBrains Rider, not VS so I wouldn't know.
@Sambafrosch
@Sambafrosch 3 года назад
@@nickchapsas I figured it out. This feature was removed. You can find the details here support.specflow.org/hc/en-us/community/posts/360013261057--VisualStudio-Extension-Ability-to-run-the-scenarios-directly-on-feature-files
@RuslanRios
@RuslanRios 3 года назад
Hi man. How can i get your fully course about of c# or .net core? Have you any tutorial beginner to the advanced?
@nickchapsas
@nickchapsas 3 года назад
I am not selling any courses. All my content is free and available on RU-vid.
@RuslanRios
@RuslanRios 3 года назад
@@nickchapsas thanks for explanation
@eduardkovacs8740
@eduardkovacs8740 3 года назад
Is this example available somewhere?
@nickchapsas
@nickchapsas 3 года назад
Check the video description
@HB-vt2dy
@HB-vt2dy Месяц назад
I know and like Cucumber from the Java world. Now I am working in a C# company and really like to introduce here Specflow. Its efficient, precise and really easy-to-use. One question remains: How can e2e Tests be composed from component tests? E.g. we have different apps (web, win, android) and Specflow Tests for each of these components. Tests are all in one .sln and for each component there is a .csproj: AllTests.sln WebTests.csproj WinTests.csproj AndroidTests.csproj e2eTests.csproj In the e2e.csproj I'd like to call tests from the other projects in order to setup e2e Tests across different components. Is this possible with Specflow?
Далее
Новый фонарик в iPhone с iOS 18
00:49
Просмотров 440 тыс.
ОБЗОР ПОДАРКОВ 🎁 | WICSUR #shorts
00:55
8 await async mistakes that you SHOULD avoid in .NET
21:13
9 "rules" for cleaner code | Object Calisthenics
23:26
Просмотров 117 тыс.
The Logging Everyone Should Be Using in .NET
15:34
Просмотров 59 тыс.
How to Write Acceptance Tests
14:49
Просмотров 64 тыс.
How to test your tests in .NET
11:05
Просмотров 38 тыс.
Новый фонарик в iPhone с iOS 18
00:49
Просмотров 440 тыс.