Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Andreas Willich
    @SabotageAndi
    I have to leave now, I'll be back in about an hour at a keyboard
    Sonu Davidson
    @sonudavidson
    No, that's the problem. It works fine if both the test proj and the plugin are in the same solution.
    But not when I use the plugin as a nuget package!
    I don't see my plug-in copied to the output folder like TechTalk.SpecFlow.NUnit.SpecFlowPlugin.dll .
    We can look into this on Monday too! Okay for me..
    Don't wanna spoil your weekend!
    Andreas Willich
    @SabotageAndi
    TechTalk.SpecFlow.NUnit.SpecFlowPlugin.dll is a runtime plugin. These has to be copied to the output directory
    as you are making a generator plugin, it is not copied
    Sonu Davidson
    @sonudavidson

    My assumption was that generator plugin will be to output directory when I use

    <None Include="$(_SFP.GeneratorPluginPath)" >
    <Link>%(Filename)%(Extension)</Link>
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    <Visible>True</Visible>
    </None>

    in Props file.

    Unless there's another way to do it. I will be interested to know.

    My assumption was that generator plugin will be to output directory when I use

    <None Include="$(_SFP.GeneratorPluginPath)" >
    <Link>%(Filename)%(Extension)</Link>
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    <Visible>True</Visible>
    </None>

    in Props file.

    Yen-Sheng Pan
    @mcpanzors_twitter
    Hi, I'm trying to develop a plugin for specflow 3.0. I need to know how to get debug vs2019 working so i can actually debug code and find out what's going on. I can't seem to find any resources on how to get debug working. Are there any links i'm missing?
    Andreas Willich
    @SabotageAndi
    Debugger.Launch is your friend @mcpanzors_twitter
    Yen-Sheng Pan
    @mcpanzors_twitter
    Hi @SabotageAndi thanks for reaching out. This above alone is not meaningful as it lacks context. Where do I run this from? Are there any existing resources like videos or tutorials that goes into debugging extensions? Your examples posted on github are very bare bones.
    Andreas Willich
    @SabotageAndi
    @mcpanzors_twitter add it to your code and run it. Debugger.Launch starts a request for the debugger. Docs of it are here: https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.debugger.launch?view=netframework-4.8
    Yen-Sheng Pan
    @mcpanzors_twitter
    Does this work with generator plugins?#
    Andreas Willich
    @SabotageAndi
    yes. it will trigger the debugger when you compile the project that uses the plugin
    Yen-Sheng Pan
    @mcpanzors_twitter
    I put this in my Plugin's code, ran the tests on my Example Project (which is in the same solution and is referenced as a project) and nothing happens. I'm missing a key component here.
    My plugin is at the generation phase. Feature.cs files are already generated by the time I run my tests via visual studio. I initially ruled this out because it was a build step. I'm confused as to how you've got this working
    Andreas Willich
    @SabotageAndi
    if you have a generator plugin, nothing is triggered when you run the tests. try to rebuild your test project.
    where did you put the debugger.launch?
    Yen-Sheng Pan
    @mcpanzors_twitter
    I put the debugger launch inside Initialize() from IGeneratorPlugin
    Building the project that uses the plugin automatically creates the feature files, but doesn't trigger any debugging
    Andreas Willich
    @SabotageAndi
    than your generator plugin is not called
    Yen-Sheng Pan
    @mcpanzors_twitter
    RIGHT, I got it finally. Problem was my setup doesn't work well with the Pluing and Test projects under the same solution and having the test project reference the plugin dll directly. May be missing the /build/* details that its expecting. Installing it via a nuget package through my internal servers seems to have allowed for debugging. Additionally, I think I had to turn off "Enable Just My Code" to get it to ask for what files to look at. Quite a complicated process. Would've been nice if there was an file I/O capability somewhere.
    Yen-Sheng Pan
    @mcpanzors_twitter
    I'd suggest edits to the plugin development section in your documentation to point to some example files you've got in your source. Would greatly improve development experience.
    Andreas Willich
    @SabotageAndi
    @mcpanzors_twitter feel free to send a PR with changes to the documentation
    Sonu Davidson
    @sonudavidson

    Hi!
    Does anyone help me how to get the tables for scenario (without place holders) in TestClassGenerationContext instance?

    Scenario: test tables
    Given I have a table with the following details
    | Option | Value |
    | width | 10 |
    | heigth | 20 |
    | length | 30 |
    When I Run the test
    Then I expect all the information in Description Attribute
    | Option | Value |
    | width | 10 |
    | heigth | 20 |
    | length | 30 |

    This is my sample scenario..

    Thanks in advance!
    Sonu Davidson
    @sonudavidson
    Hi! Still looking for an answer!
    Sonu Davidson
    @sonudavidson
    Hi @SabotageAndi Looks like you are the only one who can help me. Could you give me some idea?
    Andreas Willich
    @SabotageAndi
    the TestClassGenerationContext is the class that holds the data for the code-behind file. The table is at this point in time already only calls to SpecFlow APIs to instantiate the class.
    There is no way to find it again.
    @sonudavidson what do you want to achive? Why do you need the table?
    Sonu Davidson
    @sonudavidson
    Hi @SabotageAndi
    Well, We want to put this information in QC so that everyone knows the data sets used for the test case.
    Sonu Davidson
    @sonudavidson
    If I have to get this information into the NUnit Description Attribute, Can you give me which implementation needs to changed?
    Andreas Willich
    @SabotageAndi
    that's is no easy or quick change
    but getting this data into a single for an additional attribute is a lot of work.
    Sonu Davidson
    @sonudavidson
    Hi @SabotageAndi
    Can't a solution have 2 Specflow custom plugins?
    Andreas Willich
    @SabotageAndi
    what do you mean with that? you have 2 custom plugin projects in a solution? or that one specflow project uses 2 custom plugins
    Sonu Davidson
    @sonudavidson
    One specflow project uses 2 custom plugins
    Andreas Willich
    @SabotageAndi
    that is possible
    you have to be careful which stuff you are registering
    if you register different implementations for the same interface, the last registration will win
    Sonu Davidson
    @sonudavidson
    oh, okay..
    Do you have an example somewhere that I could use as a reference?
    Göran Halvarsson
    @GoranHalvarsson

    Hello there
    I just started with SpecFlow
    When generating the steps class I get obsolete warning:
    ScenarioContext.Current.Pending();
    Where it suggests that I should get the ScenarioContext via injection

    So why does it generate obsolete code?

    Make no sence...