Hi All,
This is not a bug report. I am looking for moderately complex sample .NET projects which demonstrate the usage of Specflow.
I have a good understanding of Specflow. I would like to learn more about the pragmatic choices that have been made by more experiecned development teams.
Thanks,
Sau
This is the most complex public project I have
https://github.com/Possum-Labs/Slipka/tree/master/Slipka.Test/Features
it is for testing a proxy that tampers with traffic. I would not bother looking at the implementation unless you like the style of the Gherkin.
Thank you. Where can I find the step definition .CS file ?
https://github.com/Possum-Labs/Slipka/tree/master/Slipka.Test/English
This is where things will not be very representative, I use a lot of generic helpers & libraries. That project also uses package references. So it is pretty useless for learning other than the step bindings.
https://github.com/Possum-Labs/DSL/tree/master/tests/PossumLabs.DSL.Slipka.IntegrationTests has an equivalent project but you have all the project references vs package references. So that makes exploring easier.
If you want to run them you can use the docker-compose in the project root, which will spin up a proxy for you to run tests against.
So in short, you can do simpler things much simpler than what I have to share, but what I have to share works well for me when I have to set up five or more different types of entities (user, customer, product, order, manifest, label, etc.) to run a specific scenario.
If you don't need to support this kind of complexity don't use the patterns I use. Stick with the default / recommended setup :)
Thank you very much. This is helpful.
I was looking at the feature files in your code base
https://github.com/Possum-Labs/DSL/tree/master/tests/PossumLabs.DSL.Slipka.IntegrationTests/Features
I have a few questions. Not all .feature files have step definitions mapped. Where can I find the step definitions for the .feature files. E.g.
Many thanks,
Sau
this is the folder with the steps
https://github.com/Possum-Labs/DSL/tree/master/tests/PossumLabs.DSL.Slipka.IntegrationTests/Steps
for instance
https://github.com/Possum-Labs/DSL/blob/master/tests/PossumLabs.DSL.Slipka.IntegrationTests/Steps/ProxySteps.cs
maps
Given the Slipka Proxy
| var| Destination |
| P1 | http://PossumLabs.com |
using
[Given(@"the Slipka Prox(?:y|ies)")]
It is no a one to one relationship, so any step definition file in any inspected assembly (try and avoid referencing external assemblies if you can, they don't always play nice in visual studio) can have the resolution for a specific step.
For instance
https://github.com/Possum-Labs/DSL/blob/master/tests/PossumLabs.DSL.Slipka.IntegrationTests/Steps/ValidationSteps.cs
has the resolution for the then step of
Then 'C1' has the values
| Response Content | StatusCode |
| Hello World | 200 |
@sdg002 Have a look at https://github.com/LogoFX/Samples.Specifications
We have a bigger example application at https://github.com/SpecFlowOSS/SpecFlow-Examples/tree/master/ASP.NET-MVC/BookShop
And @tawfiknouri made https://github.com/tawfiknouri/BDD-TDD_ParkingCostCalculator_SpecFlow
@sdg002 I would recommend asking a question like this in the Google Group Forum (https://groups.google.com/forum/#!forum/specflow). There more people who see then the question.
The collection of examples is here now: https://docs.specflow.org/en/latest/Examples.html
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.