Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 29 19:40

    github-actions[bot] on v6.0.0

    (compare)

  • Nov 29 19:16

    jeremydmiller on master

    adding .net 6 to the gh actions (compare)

  • Nov 29 19:15
    jeremydmiller closed #32
  • Nov 29 19:15
    jeremydmiller commented #32
  • Nov 29 19:14

    jeremydmiller on master

    customizations are applied thro… can use Alba web application fa… (compare)

  • Nov 29 17:28
    jeremydmiller closed #95
  • Nov 29 17:28

    jeremydmiller on master

    hardening the assertion excepti… (compare)

  • Nov 29 17:27
    jeremydmiller commented #95
  • Nov 29 17:06

    jeremydmiller on master

    Working WebApplicationFactory e… (compare)

  • Nov 29 17:06
    jeremydmiller closed #97
  • Nov 22 03:21
    Hawxy ready_for_review #97
  • Nov 20 11:19
    Hawxy opened #97
  • Nov 19 19:55

    jeremydmiller on master

    updated docs a tiny bit for rem… initial concept for using Alba … (compare)

  • Nov 19 19:55
    jeremydmiller commented #95
  • Nov 19 19:52
    jeremydmiller labeled #95
  • Nov 19 19:52
    jeremydmiller closed #83
  • Nov 19 19:52
    jeremydmiller commented #83
  • Nov 19 14:40

    jeremydmiller on master

    adding the missing bullseye bui… (compare)

  • Nov 19 14:25

    jeremydmiller on master

    WIP scenario claim modification Rework implementation, fix test… Bump version (compare)

  • Nov 19 14:25
    jeremydmiller closed #96
Jeremy D. Miller
@jeremydmiller
Sorry, gotta go finish getting kids ready for school. I’ll be back later today
Tomasz Jaskula
@tjaskula
ok, thanks :)
Jeremy D. Miller
@jeremydmiller
Wait, duh, it’s IHost.Services that you can get to off the SystemUnderTest
Tomasz Jaskula
@tjaskula
Ok so I'll have to pass it somehow to the assertion
Tomasz Jaskula
@tjaskula
After looking a bit, there is no mean I can access IHost.Services from inside the IScenarioAssertion. Scenario passed in to Assert method would need to expose the SystemUnderTests but it's not the case. It's kept internally
Jeremy D. Miller
@jeremydmiller
We could do a quick Alba 4.1 and add an overload of some kind to make it easier to do this kind of thing
And what Graph QL toolkit are you using out of curiosity? Is it the one from @joemcbride ?
Tomasz Jaskula
@tjaskula
That would be awesome if we could access somehow the app services container as we cannot rely on HttpContext. I'm using https://github.com/graphql-dotnet/graphql-dotnet
Jeremy D. Miller
@jeremydmiller
Cool, Joe is a former colleague of mine. He helped with Alba in the early days too
Tomasz Jaskula
@tjaskula
Oh, that's awesome. This world is so small
Do you think there is a chance for a release of Alba with this feature anytime soon then ?
Tomasz Jaskula
@tjaskula
@jeremydmiller I've opened the issue for reference JasperFx/alba#69
Jeremy D. Miller
@jeremydmiller
With me having 2 weeks off for Christmas, yes;)
Tomasz Jaskula
@tjaskula
I can do a PR if you prefer :)
Jeremy D. Miller
@jeremydmiller
I will very happily take that. If we expose IServiceProvider for the app off of the Scenario class it should make it easier to add declarative assertions. That’s my first thought
Tomasz Jaskula
@tjaskula
yep :)
that would be awesome
Tomasz Jaskula
@tjaskula

what I see as benefit as well is that on UT actions as here

[Test]
        public async Task SearchOneFondsQueries()
        {
            await Run(
                _ =>
                {
                    var input = new GraphQLRequest
                    {
                        Query = @"{ funds(searchQuery: ""Fond de Test Hedge en Duration"") { name } }"
                    };
                    _.Post.Json(input).ToUrl("/graphql");
                    _.StatusCodeShouldBe(HttpStatusCode.OK);
                    _.GraphQL()
                        .ShouldBeSuccess(@"{ ""funds"": [
                                            {
                                                ""name"": ""Fond de Test Hedge en Duration""
                                            }]}");
                });
        }

where Scenario is passed in into the Run function, I could add extensions method that would allow for me to retrieve a dependency, and configure expectations on it. Because for my test some fake dependencies are registered in within the test startup and initialized with SystemUnderTest.ForStartup<T>(builder =>... so that way I would have an easy way to retrieve them and set expectations based on test requirements

Jeremy D. Miller
@jeremydmiller
I’ll totally by that. What version of Alba are you using btw?
Tomasz Jaskula
@tjaskula
I'm using 3.0. because the last release is not compatible with standard 2.0
Jeremy D. Miller
@jeremydmiller
You can still use it with ASP.Net Core 2.*
the latest I mean. Took a lot of conditional compilation to make it happen of course. Multi-targeting asp.net core versions is rough right now with the churn
Tomasz Jaskula
@tjaskula
yes, our test project targets right now net472
Jeremy D. Miller
@jeremydmiller
Ah, shoot, okay. I think we gave up on ASP.Net Core < 2 in the latest
Tomasz Jaskula
@tjaskula
that's why, we have a lot of "legacy" dependencies, we cannot migrate it easily
Jeremy D. Miller
@jeremydmiller
I completely get it
Tomasz Jaskula
@tjaskula
ahhh
I understand maintaining old platforms is not easy for you
Jeremy D. Miller
@jeremydmiller
It is when the platform changes a lot in a few years
Ralph Hendriks
@ralphhendriks

@jeremydmiller I just started playing around with Alba for some HTTP API integration tests. So far, I like it a lot. One thing that bugs me though is that the built-in assertion on the content type behaves not as I would expect. I have configured my scenario _.ContentTypeShouldBe("application/problem+json"), which then fails with:

Alba.ScenarioAssertionException : Expected a single header value of 'content-type'='application/problem+json', but the actual value was 'application/problem+json; charset=utf-8'

Of course I can include the charset on the expected value. However, it feels a bit clunky to do so. I could make a contribution to improve this if you like, but I am not sure if this fits in your ideas how the library should develop.

Jeremy D. Miller
@jeremydmiller
A PR for this would be very welcome. I think you’d end up making hte content type check be a custom assertion so it can be smart enough to parse mime types
dionfoster
@dionfoster
:wave:
hi guys, i'm looking to use alba for integration testing of a dotnet core 3.1 api endpoint
it is using multipart/formdata with an IFormFile
i don't mind putting together a PR for this but need some help
first off, is there a way to view the raw request alba is sending?
Jeremy D. Miller
@jeremydmiller
Right now the answer is “debugger”. I’d happily take a PR if you want an optional sink to display the incoming request.
dionfoster
@dionfoster
:thumbsup:
dionfoster
@dionfoster
hey guys i've posted a PR for review to add support for multipart form data and IFormFile, hopefully a starting point for conversation on a few aspects
dionfoster
@dionfoster
feedback appreciated
Jeremy D. Miller
@jeremydmiller
@dionfoster I’ll get something to you tomorrow. It was on my TODO list in the morning, but I didn’t get to it
dionfoster
@dionfoster
no problems! thanks!
dionfoster
@dionfoster
depending on what is desirable from an api perspective, might need some implementation changes with regards to the formcollection as the only way i could get this going was to replace the entire formcollection on the HttpRequest
JT
@Hawxy
@jeremydmiller I know you're not focusing on alba right now, but would you accept a semver major maintenance PR that drops support for .net core 2.x and adds a .net 5 target with related test host?
Jeremy D. Miller
@jeremydmiller
Oh hell yes I would, and thank you!
JT
@Hawxy
#80 is up for review
Jeremy D. Miller
@jeremydmiller
@Hawxy Alba v4 is up on Nuget, and I’ve published the doc updates you did. Thank you so much for taking that on!
JT
@Hawxy
:thumbsup:
Ismail Mayat
@ismailmayat
is it possible to post ToUrl where the url has param [FromRoute] ?