Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Andreas Willich
    @SabotageAndi
    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...
    Andreas Willich
    @SabotageAndi
    @GoranHalvarsson because we didn't updated the generator of this code yet. see techtalk/SpecFlow#1490
    Göran Halvarsson
    @GoranHalvarsson
    Thanks for answering, keep up the good work
    Prab
    @TotalTest

    Hi, I'm currently making use of the SpecFlow.Autofac plugin. It look like the ContainerBuilder is created/ended per scenario, but I feel like there are things should be allowed to have a lifetime of the entire test run.

    For example a logger, or a HttpClient (so to avoid socket exhaustion) for example. I think I've got a way of doing this which is to create a seperate container builder BeforeTestRun and registering a singleinstance there, then resolving within the ScenarioDependencies method so the same instance is used for each scenario. And finally disposing the seperate container in the AfterTestRun hook.

    One of the things I'm trying to do is use a logger throughout the entire test run, I don't think this is unusual and creating/registering a new logger for each scenario seems overkill. I also wanted to hook into ITraceListener and use a custom listener.

    This probably isn't specific to the Autofac plugin but would anyone have an example, or idea of how to achieve this? Maybe it's a core specflow issue as the ITraceListener is registered per scenario? Apologies if I've assumed certain things that are incorrect.

    Andreas Willich
    @SabotageAndi
    As far as I remember overwriting ITraceListener doesn't work currently, because we are resolving internally an instance before the plugins can register a different instance
    and in every container (testrun, testthread, feature, scenario) it is registered
    Prab
    @TotalTest

    Ah ok, yes I think the issue is tracked here
    SpecFlowOSS/SpecFlow#1590

    Hope there's a solution for this soon.

    Göran Halvarsson
    @GoranHalvarsson
    Hey good people
    I have the specflow v 3, now how do I generate reports, in previous versions. You could generate reports with specflow.exe
    So what do I do that now?
    Göran Halvarsson
    @GoranHalvarsson
    Any suggestion
    Andreas Willich
    @SabotageAndi
    @GoranHalvarsson You could have a look at the reporting in the SpecFlow+Runner
    Prab
    @TotalTest

    Hi team, I've created a specflow plugin and was hoping to push to nuget.org
    However I get a id conflict error, I can't see any other package with the same name so I'm guessing it's because my package starts with 'SpecFlow.'?

    Am I able to get permission to use this? My propose package name is 'SpecFlow.Variants'

    Andreas Willich
    @SabotageAndi
    We reserved the Id's some time ago: https://specflow.org/2017/nuget-packages-reserved-id-naming-conventions/
    If you name the package SpecFlow.Contrib.Variants you should be able to upload
    Prab
    @TotalTest
    Excellent, thanks Andreas
    Andreas Willich
    @SabotageAndi
    @TotalTest I saw that you also wrote us an email. I will ignore it now. Ok?
    We have a docu page with plugins: https://specflow.org/documentation/Available-Plugins/
    You could add your plugin to it
    Prab
    @TotalTest
    Yep please ignore that. Thanks I will look at doing that.
    Daniel Labudek
    @dlabudek_gitlab
    Hi, how can I change[NUnit.Framework.TestFixtureAttribute()] in *feature.cs?
    What should I add to
    Initialize(GeneratorPluginEvents generatorPluginEvents, GeneratorPluginParameters generatorPluginParameters,
    UnitTestProviderConfiguration unitTestProviderConfiguration)
    Unfortunatelly there is no real documentation that will help me. Thanks.
    goblinmaks
    @goblinmaks
    @dlabudek_gitlab for this case you should rewrite your-own NUnit3TestGeneratorProvider. What of reason to change TestFixtureAttribute() for your case ?
    Daniel Labudek
    @dlabudek_gitlab
    I'm running test in parallel and TestFixtureAttribute should allow me to control what tests can be run with each other in parallel. Right know tests in different feature files can be run in parallel but this is not enough. I want to allow only test in different folders to run in parallel.
    Daniel Labudek
    @dlabudek_gitlab
    I find out that TestFixtureAttribute is set in public void SetTestClass(). SO I should probably override this method, but how can I do it? I do not understand the plugin logic.