by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 15 20:50

    dependabot[bot] on npm_and_yarn

    (compare)

  • Jul 15 20:50
    dependabot[bot] closed #785
  • Jul 15 20:50
    dependabot[bot] commented #785
  • Jul 15 20:50

    dependabot[bot] on npm_and_yarn

    Bump lodash from 4.17.4 to 4.17… (compare)

  • Jul 15 20:50
    dependabot[bot] labeled #792
  • Jul 15 20:50
    dependabot[bot] opened #792
  • May 26 13:02
    lhaussknecht opened #791
  • Apr 29 22:58

    dependabot[bot] on npm_and_yarn

    Bump jquery from 2.2.4 to 3.5.0… (compare)

  • Apr 29 22:58
    dependabot[bot] labeled #790
  • Apr 29 22:58
    dependabot[bot] opened #790
  • Jan 19 16:04
    mvastarelli commented #789
  • Jan 19 04:10
    SergeiGolos review_requested #789
  • Jan 19 04:06
    SergeiGolos synchronize #789
  • Jan 19 01:12
    SergeiGolos synchronize #789
  • Jan 19 01:07
    SergeiGolos synchronize #789
  • Jan 18 22:30
    SergeiGolos synchronize #789
  • Jan 18 22:29
    SergeiGolos synchronize #789
  • Jan 15 22:18
    SergeiGolos synchronize #789
  • Jan 15 15:49
    SergeiGolos synchronize #789
  • Jan 15 02:27
    SergeiGolos opened #789
Jeremy D. Miller
@jeremydmiller
Are you getting tripped up on the Fixture class’s lifecycle then?
Sergei Golos
@SergeiGolos
Kind of, what i am trying to first figure out is if my usecase of "optional" steps is outside of the expected storyteller workflow. (assuming the user is dumb and can't select appropriate tags to select the tests we want to run.)
Jeremy D. Miller
@jeremydmiller
Storyteller isn’t going to do any kind of optional step like that, no.
You could do something in the Fixture code that short circuits the check I suppose and stubs in a success
Sergei Golos
@SergeiGolos
Well from looking at the code, that's kind of what i though the methods resulting in IGrammar were for, but it seems that at that point in time you don't have access to the system at test.
Jeremy D. Miller
@jeremydmiller
Correct. “IGrammar” is kind of like a recipe for an action or an assertion that will happen at specification time. You’re creating a syntax to be used within specifications
Sergei Golos
@SergeiGolos
And all the Fixtures are loaded and compiled into specifications before the system under test is loaded?
Jeremy D. Miller
@jeremydmiller
Not quite. The Fixtures are built independently of loading either the system or the specifications. As part of execution, specifications are “planned” where the steps are attached to all the right IGrammars, but that’s meant to be an implementation detail
Sergei Golos
@SergeiGolos
Right, that makes sense. So is there any other way to get service resolution when the IGrammer method is compiled? It seems because of the Fixture composition features, we can't really do DI on fixture, and have a static singleton DI container seems bad.
Jeremy D. Miller
@jeremydmiller
Nope, you’d need to make everything lazy.
And as of Storyteller 3.0, it purposely does not do dependency injection against Fixtures because that became a performance issue to rebuild Fixture objects for every test
Sergei Golos
@SergeiGolos
ok thank you for your time, seems like i need to go back to the drawing board here
Jeremy D. Miller
@jeremydmiller
Yeah. I don’t think Storyteller is gonna be your guy here unless you can live within its normal idioms
Udemy free courses
@ayoub50706635_twitter
Hello has anyone tried the IGrammer Method ?
Sergei Golos
@SergeiGolos
Hey Jeremy!!! quick question, i have been crawling around in the Storyteller runner logic for the past couple of hours, and i am wondering if there is any specific way to hijack the document creation process. Basically, i want to add some scripts tags with helpful javascript methods for linking and other dynamic functionality. I see that most of the work on report generation is done by BatchResultsWriter, which is a static class. Is there any way around that?
Seems like my only option with code as is, is basically post processing on the generated file?
Sergei Golos
@SergeiGolos
    public static HtmlDocument BuildResults(BatchRunResponse results, IEnumerable<IDocumentBuilder> sideloadedBuilders = null)
    {
        var document = new HtmlDocument
        {
            Title = "Storyteller Batch Results for {0}: {1}".ToFormat(results.system, results.suite)
        };

        var cssFiles = new[]
        {
            new ResourceFileLoader("Storyteller.stylesheets.bootstrap.min.css"),
            new ResourceFileLoader("StoryTeller.stylesheets.storyteller.css"),
            new ResourceFileLoader("StoryTeller.stylesheets.fixed-data-table.min.css"),
        };
        var jsFile = new ResourceFileLoader("StoryTeller.batch-bundle.js");

        var builders = new IDocumentBuilder[] {
            new StylePartBuilder(cssFiles),
            new ScriptPartBuilder(jsFile),
            new ReportPartBuilder(),
        };

        foreach (var builder in builders.Concat(sideloadedBuilders))
        {
            builder.Apply(document, results);
        }

        return document;
    }     
Jeremy D. Miller
@jeremydmiller
Is that the existing code, or a suggestion about changing it? I don’t think it’d be that bad to add some extensibility there
Sergei Golos
@SergeiGolos
yeah this is what i am playing around with for changing it
no "new" code, just moving some stuff around and hiding it behind interface classes
interfaced* classes
Jeremy D. Miller
@jeremydmiller
Cool, thought so. Looks good to me. Maybe do something a little more formal for v6, but that’s gonna be awhile
Sergei Golos
@SergeiGolos
well, the issue that i am running into, is while this method would allow side loading of additional IDocumentBuilder(s), i think the call to this is behind the "RunCommand" object and that I don't know how to inject the sideloadedBuilders there
i mean i guess the hackish way would be to expose a static property we modify in the program file.. but as an engineer that bothers me :(
Jeremy D. Miller
@jeremydmiller
Cheat and make it a static, so you could do it in your ISystem. The static makes it easy to avoid breaking backward compatibility.
And yeah, but we could revisit it with v6;-)
Sergei Golos
@SergeiGolos
so i should make a pull request? sorry this is popping my open source cherry :)
Jeremy D. Miller
@jeremydmiller
Ah, cool, yes please.
Sergei Golos
@SergeiGolos
Any suggestions on how you do faking/mocking in the tests project? Do you do mocking/faking?
Sergei Golos
@SergeiGolos

One more question/suggestion. One of the more useful tools for me in storyteller is the custom reports feature. It is something i have been using heavy. But while the feature is powerful, it doesn't really come with any components to make the reports look professional or even like they belong tool. Storyteller is based on bootstrap, but if you want to generate bootstrap components you end up having to roll your own with the very generic HtmlTag and TableTag.

Anyways, what i am getting at is, I rolled my own with wrappers around a bunch of bootstrap components as well as helpers for working with with typed data tables and lists. Would it be worth while for the StoryTeller project for me to port that in? Hopefully save some effort for future users.

Sergei Golos
@SergeiGolos
Here is a glimpse:
public class MappedHtmlTable<TType> : TableTag
    {
        private readonly List<MappedHtmlColumn<TType>> columns = new List<MappedHtmlColumn<TType>>();
        private TableRowTag headerRow = null;

        public MappedHtmlTable(IEnumerable<MappedHtmlColumn<TType>> columns)
            : base()
        {
            this.AddClass("table");
            this.AddClass("table-hover");
            this.Style("width", "100% !important;");

            foreach (var column in columns)
            {
                this.Column(column);
            }
        }

        public MappedHtmlTable<TType> AddRows(IEnumerable<TType> rows)
        {
            foreach (var row in rows)
            {
                this.AddRow(row);
            }

            return this;
        }

        public TableRowTag AddRow(TType rowData)
        {
            return this.AddRow(row => this.columns.Each(col => col.Map(rowData, row.Cell())));
        }

        public TableRowTag AddRow(HtmlTag tag)
        {
            return this.AddRow(row => row.Cell()
                .Attr("colspan", this.columns.Count)
                .Children
                .Add(tag));
        }
        protected override void WriteHtml(HtmlTextWriter html)
        {
            if (this.TBody.Children.Count == 0)
            {
                var errorMessage = new AlertTag("No Elements Found")
                    .Update(new HighlightDanger())
                    .Update(new MakeLarge());

                this.AddRow(errorMessage);
            }

            base.WriteHtml(html);
        }
  }
Jarrod
@JarrodJ83
Anyone have issues running storyteller with dotnet3.1? I'm getting The framework 'Microsoft.NETCore.App', version '1.0.5' was not found when running dotnet storyteller
Not sure why it's looking for v1.0.5
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp3.1</TargetFramework> </PropertyGroup> <ItemGroup> <DotNetCliToolReference Include="dotnet-storyteller" Version="5.0.0" /> </ItemGroup> <ItemGroup> <PackageReference Include="Storyteller" Version="5.4.0" /> </ItemGroup> </Project>
static void Main(string[] args) { StorytellerAgent.Run(args); }
Jarrod
@JarrodJ83
Looks like this was caused by mismatch in version of cli tool and storyteller packges. Fixed them both to be 5.4.0 and now it "works" but the UI gets stuck loading and never comes up. Anyone else experience any issues like this?
Jeremy D. Miller
@jeremydmiller
Check the console output and see if there’s anything going on there. You can check for JS errors too, but I’d expect the problem to be on the server side. Might try just running the tests from the command line.
Jarrod
@JarrodJ83
Looks like it was a result of running from GitBash
Reran from a standard command line and worked!
Jeremy D. Miller
@jeremydmiller
In ST v6 — which doesn’t happen until Marten v4 and Jasper simmer down — I think the UI becomes a global tool.
Wonder why? Different pathing rules or something?
Jarrod
@JarrodJ83
Ya that I do not know... I do know I can help on that Jasper simmer down... Still need to get back to that this week :)
Jeremy D. Miller
@jeremydmiller
I’m jammed up this week w/ Marten, but next week, wanna shoot for Jasper v2?
Jarrod
@JarrodJ83
I think that is reasonable. I'm in a training course from tomorrow until Tuesday so I will be tied up but hopefully can get back to jasper on the backend of next week
Jeremy D. Miller
@jeremydmiller
That sounds good to me
Jarrod
@JarrodJ83
Has anyone spun Storyteller up in a docker-compose that had the system that was being tested? I basically want to have everything self contained so storyteller has access to the system within the docker network
Jarrod
@JarrodJ83

looks like I get the following when running in a linux container unfortunately

It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found.

  • No frameworks were found.

You can resolve the problem by installing the specified framework and/or SDK.

stefan geco
@SefanGeco_gitlab

Hy all!
I have following problem, when I try to run the quickstarts app (Storyteller v5) with command "dotnet storyteller" (after successful "dotnet restore"):

It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '1.0.5' was not found.

  • The following frameworks were found:
    2.0.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    2.0.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    2.1.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    2.1.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    2.1.6 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    2.1.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    2.1.11 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    2.1.13 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    2.1.16 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    2.1.18 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    3.1.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    You can resolve the problem by installing the specified framework and/or SDK.
    The specified framework can be found at:
Jeremy D. Miller
@jeremydmiller
Just looks like it’s time to go refresh those sample apps. Storyteller as a project hasn’t been very active the past couple years, and I just let those go stale. There is going to be a reboot late this year though
stefan geco
@SefanGeco_gitlab

I fixed it. Just needed to modify the csproj to this (netcoreapp to v3 and versions from 5.0 to 5.4):

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<OutputType>EXE</OutputType>
</PropertyGroup>
<ItemGroup>
<DotNetCliToolReference Include="dotnet-storyteller" Version="5.4.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="dotnet-storyteller" Version="5.4.0" />
<PackageReference Include="StoryTeller" Version="5.4.0" />
</ItemGroup>
</Project>

Just want to say that I work since some days with storyteller for my WPF app and I really love it!