Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    dagilleland
    @dagilleland
    With some CI building, I hope to generate the report and put it in the documentation repo. Getting it from the console is fine, as that's where I was going to end up anyway - just was wondering about seeing it in VS IDE.
    Thanks for your help! You cut short what was turning into a grueling afternoon! :+1:
    Blair Conrad
    @blairconrad
    Ha. Glad to hear it. I hope you're somewhere in the western Americas. Otherwise a long afternoon indeed!
    dagilleland
    @dagilleland
    Edmonton, Alberta, Canada :flags:
    Blair Conrad
    @blairconrad
    Nice. I'm landing there in early September.
    dagilleland
    @dagilleland
    New job?
    Or holidays?
    Blair Conrad
    @blairconrad
    Taking a 2ish week vacation. Edmonton/Barrhead/Jasper/Banff/Drummheller/Brooks/Calgary.
    Gonna see me some mountains and dinosaurs!
    dagilleland
    @dagilleland
    Sweet! Wishing you a good holiday & refreshment!
    Blair Conrad
    @blairconrad
    Thanks! My wife has family in Edmonton, Barrhead, and Calgary as well, so a good time should be had.
    Happy xBehaving.
    Next time, swing by the FakeItEasy Gitter. The answers roll off my fingers a little better there. :wink:
    dagilleland
    @dagilleland
    Shall do!

    FYI @blairconrad - A little follow-up on what I'm generally trying to achieve:

    Following advice from a Greg Young video (circa 2011/12) on doing DDD tests with Event Sourcing, I'm looking at leveraging xbehave with patterns of .ToString() on Commands/Events to write lean but expressive tests that output nicely to HTML (see image below).

    2018-07-17_17-27-43.png
    Blair Conrad
    @blairconrad
    Nice!
    Adam Ralph
    @adamralph
    @dagilleland another thing you might find interesting is https://github.com/ursenzler/xbehavemarkdownreport
    Jason Wisener
    @jwisener
    hi with xbehave is there a central place one can determine if the test failed?
    I want to take a screenshot if any step has failed in the test.
    Adam Ralph
    @adamralph
    @jwisener that's really an xunit question. Ultimately, xbehave steps are run by the xunit infrastructure as individual tests. If xunit allows some method of plugging into that pipeline, and performing some kind of general action (such as taking a screenshot) when a test fails, then it should be possible. I recommend asking over in the xunit chat: https://xunit-slackin.herokuapp.com/
    if you ask over there, ping my username in the question so I get notified, and I'll chime in if required
    Anthony Truskinger
    @atruskie
    image.png

    Hey there, I'm new to xbehave and I wanted to ask a style question. The docs say ", it should never be necessary to write code outside of a step. If you ever find a need to do so, please let us know"; I've found a reason and I wanted to know what you thought.

    I've got a massive amount of data-oriented test-cases. While most of the test cases require most steps and assertions to run, some should fail. This logically led to using a if statement to test these two different branches, and violated the no writing code rule.

    The tests run and work how I'd like but from a style perspective, are there any problems with this?

    Thanks!
    Adam Ralph
    @adamralph
    @atruskie I would write two scenarios for this. One with data that parses, and one with data that doesn't
    Anthony Truskinger
    @atruskie

    @adamralph Thanks for the response. I thought about doing as you suggested but there are multiple attributes to be tested - the date example i showed is just the first case... then there's lat, lng, etc... Though that means I should probably think about factoring this into smaller chunks anyway. I think this feature xbehave/xbehave.net#17 would make it easier to factor these into smaller specifications.

    However, I have been using the branching, like above, and from a technical standpoint there doesn't seem to be any problems...

    Adam Ralph
    @adamralph
    @atruskie yeah, I guess it should work just fine. It just looks a little odd, since I've never seen branching of the steps before :-) But here's another idea: in the cases where test.DateParseable == false, why not make test.ExpectedDateTime = null? Then you can use Assert.Equal() for all cases.
    and in that case, I guess the test.DateParseable property may become redundant
    Anthony Truskinger
    @atruskie
    @adamralph that's a good idea, thanks
    Adam Ralph
    @adamralph
    @atruskie you're welcome. Thanks for raising the question.
    Christian Johansen
    @cjjohansen_twitter
    Has any one succeeded in using dotnet test for generating xbehave xml output to be used by xBehaveMarkdownReport?
    ive tried this dotnet test --test-adapter-path:. --logger:xunit;LogFilePath=markdown-report.xml
    but im not sure the generated xml is xBehave style
    Adam Ralph
    @adamralph
    @cjjohansen_twitter there's no such thing as "xBehave style". There is only the style of the various xunit runners. AFAIK xBehaveMarkdownReport is designed to consume the output of the xunit console runner only. Someone else was trying this for the "trx" output, and raised an issue here: appccelerate/xBehaveMarkdownReport#3
    Christian Johansen
    @cjjohansen_twitter
    What I mean is XML format that xbehave markdown report can parse.
    Adam Ralph
    @adamralph
    @cjjohansen_twitter right, so at the moment, that would be the XML that xunit.console.exe produces
    if you can match that, then xBehaveMarkdownReport should work just fine
    Christian Johansen
    @cjjohansen_twitter
    I downgraded to v. 2.3.0 to use dotnet xunit. That works.
    But I'm still curious to how I could make dotnet test produce the same xml output. Maybe I should ask in xunit forum .
    Thx @adamralph
    Adam Ralph
    @adamralph
    you're welcome @cjjohansen_twitter
    ben-foster-cko
    @ben-foster-cko
    Hi all, trying out XBehave for the first time as a potential replacement for NSpec
    How can I get the BDD output when running dotnet test?
    It must be possible as the VS Code runner is doing it. However, even with that I don't get the name of the steps in the output:
    image.png
    Adam Ralph
    @adamralph
    @ben-foster-cko in all cases, all the various runners see are xunit tests, one for each step. Those tests are contained with xunit test cases, one for each scenario. Some runners, like ReSharper, respect that
    Others don't.
    The vs test explorer kind of respects it. It shows the test cases in the tree vir
    Sorry, on phonr
    ben-foster-cko
    @ben-foster-cko
    since I've never dived this deep into test runners/XUnit before, are you able to point me in the right direction/source code