SpecFlowOSS / SpecFlow

#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
https://www.specflow.org/
Other
2.24k stars 754 forks source link

Step definition report does not support external step assemblies #500

Closed gerich-home closed 8 years ago

gerich-home commented 8 years ago

When you put your bindings into a separate project (assembly) and specify it's name in app.config file of your main project StepDefinitionReport does not take bindings from that external step assembly. That means that you can not find unused/dead bindings that can or should be removed.

I believe it could be fixed by traversing not only the "root" assembly, but also by reading the app.config file next to it and using stepAssemblies element to collect bindings from all dependent assemblies:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <specFlow>
    <stepAssemblies>
      <stepAssembly assembly="Steps.Common" />
      <stepAssembly assembly="SeleniumSupport" />
       ...
    </stepAssemblies>
  </specFlow>
</configuration>

The changes should be made somewhere around the following lines https://github.com/techtalk/SpecFlow/blob/59830f4c1c6413f354aaf708cd0d07c7b628460f/Reporting/BindingCollector.cs#L121 - additional assemblies will need to be loaded as per app.config into the AppDomain (as per my understanding assemblies can be not loaded with the "root" assembly automatically, ex. you do not have a direct reference to the step assembly from the code).

darrencauthon commented 8 years ago

@gerich-home If you know where to make the changes, why not start a pull request?

samholder commented 8 years ago

+1

On Tue, Oct 20, 2015 at 10:21 AM, Darren Cauthon notifications@github.com wrote:

@gerich-home https://github.com/gerich-home If you know where to make the changes, why not start a pull request?

— Reply to this email directly or view it on GitHub https://github.com/techtalk/SpecFlow/issues/500#issuecomment-149489746.

gerich-home commented 8 years ago

@darrencauthon Have no free time now at work... Lots of more important stuff. So if anybody have it - please feel free to fix it

darrencauthon commented 8 years ago

@gerich-home I don't have time to do it at work, either. Nearly 100% of the work I've done on SpecFlow has been done at home, outside of work. I think that's probably the case for most non-techtalk contributions.

It doesn't seem like a fix to me, but a feature. This is the type of ticket that can sit around for months, as nobody will look at it. Let it sit for a bit and see if someone jumps on it, but otherwise I think this ticket should be closed.

darrencauthon commented 8 years ago

Preemptively closed it. I'll wait a bit longer to press the button again.

MoonStorm commented 8 years ago

@darrencauthon Your "constructive" criticism is everywhere. Let me give you a piece of advice pal. First of all, there is no point repeating yourself at every open issue asking pathetically for a PR. We all know how this works. If people become passionate about something and are willing to put the effort into it to pass a roadblock, they will. You can't force them to do that. Until then, it's a simple matter of a group of people giving something away for free, expecting nothing in return, and continuing to support the project out of love. The moment you lost that love and without enough traction in the community, it will die.

The only thing you're doing is pushing everyone away.

Another idea would be to stop closing unresolved issues. Other people can find them more easily, relate to the them, share workarounds, even provide a PR that actually solves it.

darrencauthon commented 8 years ago

I think my approach tends to turn some people away, sure... but it also can poke devs who otherwise wouldn't contribute into helping. With some it's as easy as asking "Why don't you submit a fix for this?" as it can be a big mental hurdle for a developer to think he/she is capable of submitting a pull request.

Myself included... years ago I never thought of myself as capable of contributing to a project as awesome as SpecFlow. But I had ideas... so I executed them in my own codebase. But after a good amount of prodding by other SpecFlow devs, I did it. And it helped to open me up to being a more active OSS contributor, and I know others can make the same move.

My own prodding has turned some devs away, for sure, but I know it's also gotten others to contribute. And I always have a ton of accolades for those who do contribute. So this approach cuts both ways... but one way isn't a cut, it's a big hug with a pat on the back.

Regarding tickets, SpecFlow was choking on tickets. Hundreds of tickets submitted by people with no intention of fixing them, and nobody looking at them... such an enormous backlog made the project look like it was unmaintained and hindered future development. I mean, who can even know what to do with a big pile? But I haven't been just randomly closing tickets -- I've spent hours going through most-if-not-all of them, marking them with suggestions on how to proceed with them. It's a lot better now, but honestly -- I want to close more tickets!

We are programmers, not project managers. We code for a living. We write code. It's really easy to write words... see, like this, and this, and this... and here are some more words, I can just type them and type them and type them. The author of this ticket is probably the most qualified person to execute a PR for this ticket... so why not? :smile:

darrencauthon commented 8 years ago

I haven't even dropped my usual Tom Cruise picture in this ticket... which, why not now? :laughing:

showmethepullrequest

MoonStorm commented 8 years ago

Oh boy...

Well, what can I say. I guess this is another way of looking at it. Hope it works out. Speaking for myself, this kind of attitude pushed me away.

samholder commented 8 years ago

Moonstorm, were you about to submit a pull request, but have now been put off?

Asking people to submit a pull request is unlikely to put off those that were going too IMHO On 22 Oct 2015 17:33, "MoonStorm" notifications@github.com wrote:

Oh boy...

Well, what can I say. I guess this is another way of looking at it. Hope it works out. Speaking for myself, this kind of attitude pushed me away.

— Reply to this email directly or view it on GitHub https://github.com/techtalk/SpecFlow/issues/500#issuecomment-150281857.

MoonStorm commented 8 years ago

No, and I don't intend to. The approach is too extreme in my opinion, if it is intentional as Darren is saying.

Asking straight away for a PR without even discussing the issue/feature first and then closing it due to an itchy finger. I'm sorry but this is simply disrespectful in my books. Good luck though.

darrencauthon commented 8 years ago

It wasn't an itchy finger, it was a FAT finger. :) I wrote that comment above the close on my phone, then accidentally clicked "close and comment" instead of "comment". Purely accidental, and I immediately opened it.

If it helps, @MoonStorm, I'll stay away from your PRs and issues. :no_mouth:

lock[bot] commented 5 years ago

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.