Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 21 2021 05:03
    Hawxy synchronize #99
  • Dec 21 2021 04:55
    Hawxy opened #99
  • Dec 16 2021 03:04
    Samuel-Langlois-BimOne commented #95
  • Dec 15 2021 15:33

    dependabot[bot] on npm_and_yarn

    (compare)

  • Dec 15 2021 15:33
    dependabot[bot] closed #94
  • Dec 15 2021 15:33
    dependabot[bot] edited #94
  • Dec 15 2021 15:33
    dependabot[bot] commented #94
  • Dec 15 2021 15:33

    dependabot[bot] on npm_and_yarn

    (compare)

  • Dec 15 2021 15:33
    dependabot[bot] closed #91
  • Dec 15 2021 15:33
    dependabot[bot] edited #91
  • Dec 15 2021 15:32
    dependabot[bot] commented #91
  • Dec 15 2021 15:31
    dependabot[bot] edited #91
  • Dec 15 2021 15:31
    dependabot[bot] edited #94
  • Dec 15 2021 15:31

    mysticmind on master

    Update vitepress to 0.20.9 (compare)

  • Dec 02 2021 15:05

    jeremydmiller on gh-pages

    Documentation Update for 5.0.0 (compare)

  • Dec 02 2021 15:03

    jeremydmiller on master

    doc updates for Alba 6 (compare)

  • Dec 01 2021 16:52
    dhaligas opened #98
  • Nov 29 2021 19:40

    github-actions[bot] on v6.0.0

    (compare)

  • Nov 29 2021 19:16

    jeremydmiller on master

    adding .net 6 to the gh actions (compare)

  • Nov 29 2021 19:15
    jeremydmiller closed #32
Jacob Krieg
@jkrieg
Solved the problem, Jeremy. We are in the midst of implementing NodaTime to our solution, and had a missing serialization setting to account for it. Thanks again.
Jeremy D. Miller
@jeremydmiller
Gotcha. That's happened before. So it's really a serialization issue, but Alba made it look like it was a content problem? I'm gonna call that an opportunity for improvement then. Thank you letting me know!
srollinet
@srollinet

Hi! I have the same issue with Alba v5 returning an empty result when using Scenario.

            var response = await Host.Scenario(x =>
            {
                x.Get.Url("/static/countries");
                x.StatusCodeShouldBeOk();
                x.ContentShouldContain("Mexico");
            });

            var output = response.ReadAsJson<List<CountryResponse>>(); // null
            var output2 = await Host.GetAsJson<List<CountryResponse>>("/static/countries"); // ok

Note, ContentShouldContain works as expected

Jeremy D. Miller
@jeremydmiller
@srollinet It's not rewinding the stream, I think it'll be an easy fix
Jeremy D. Miller
@jeremydmiller
Hey everybody, there's a new Alba v5.0.1 on Nuget just now. This is to resolve some issues with JSON serialization for #92 and #93. The response reading is now reentrant, meaning that you can do ReadAsJson()/ReadAsText() in any order as many times as you'd like. There's also more visibility into JSON serialization errors or empty content when trying to execute ReadAsJson() for easier to diagnose test failures
The next Alba release -- maybe next week -- will be to make sure it's good on .Net 6. I'd like to add a sample of using Alba with the new minimal APIs
JT
@Hawxy
Would it be possible to add extensions to remove or replace claims within a scenario?
We have a number of tests that rely on the ability to change the tenant ID or other token data mid-run.
Jeremy D. Miller
@jeremydmiller
@Hawxy Nothing today, it’s just additive. But also probably not a huge deal to change to give you better control over that. Sounds like a very helpful PR
JT
@Hawxy
Cool, I'll investigate and put something up.
JT
@Hawxy
btw I pushed up #96
JT
@Hawxy
Any chance of getting this in? Unfortunately it's a blocker for us moving to v5.
Hallstein Brøtan
@hallstein82_twitter
Any news on supporting .NET 6? Documentation on how to create a test fixture with only Program.cs would be highly appreciated.
JT
@Hawxy
There might need to be a new overload that uses WebApplicationFactory<TEntryPoint>, as the internal HostFactoryResolver is required to resolve the minimal host.
I'm not wild about messing with WebApplicationFactory, but we can try that too.
JT
@Hawxy
Can't say I'm a huge fan of needing a bespoke minimal API design to fit Alba.
I did a bit of work spiking integration with WebApplicationFactory, let me know what you think of #97.
JT
@Hawxy
In theory you could move everything that lives in AlbaHost into the factory and standardize on it across the board, although at the cost of ForStartup and consumers with unusual entry-points.
Jeremy D. Miller
@jeremydmiller
I think the ForStartup() needs to die and go away anyway. Too much other stuff potentially happens on HostBuilder. I need to think about it a touch more, but I’m inclined to agree with the approach in that PR. Now that I understand the magic of how WebApplicationFactory resolves things w/o having to duplicate all the project configuration, I think I’m good with what you did.
Oakton is going to be a totally different problem, but that’s later next week’s problem
Thank you for doing that!
JT
@Hawxy
No problem. You might've seen it already but Andrew Lock has some great articles around the HostFactoryResolver internals: https://andrewlock.net/exploring-dotnet-6-part-5-supporting-ef-core-tools-with-webapplicationbuilder/
Jeremy D. Miller
@jeremydmiller
@Hawxy I pulled your PR in today. Added a tiny bit more tests, and made some mild adjustments, but it's looking good right now.
Jeremy D. Miller
@jeremydmiller
Alba 7.0 is up with support for WebApplication & WebApplicationBuilder. Docs and a blog post will follow later this week or next.
JT
@Hawxy
Sweet!
JT
@Hawxy
I did have another branch in the works that's more aggressive and removes everything apart from the WebApplicationFactory extensions, cleaning up the AlbaHost quite a bit. The ecosystem might not be ready for that yet though :)
Jeremy D. Miller
@jeremydmiller
I was impatient to shoot that one out. Trying to clear the deck fast for the .Net 6 stuff. I don’t want to drop support for IHostBuilder at the least. No reason to strip out stuff that works in .Net 5/6
JT
@Hawxy
Got a quick one: JasperFx/alba#99
Jeremy D. Miller
@jeremydmiller
I’ll get that today. And hey, check the Marten room too. I think we’re having to partially reverse some of the async improvement PR you did awhile back. Might be interesting to watch that
pieteckhart
@pieteckhart
Hi,
I'm currently running my integration tests using Microsoft.AspNetCore.Mvc.Testing directly. This allows me to use the HttpClient directly so I can inject it in a (swagger) generated rest client.
I would like to make use of the Security Extensions that Alba provides. Is there any way to access the underlying httpclient in an Scenario?
Jeremy D. Miller
@jeremydmiller
Not right now, no. Sounds like an interesting pull request though. The extensions are only working against Alba’s in memory scenario model.
And I’d argue that using Alba would be easier than trying to do things directly through HttpClient anyway in most cases
pieteckhart
@pieteckhart
Thanks for the quick reply. Maybe in the future I can contribute. For now I have worked around it without using Alba.
Trying out Alba made me fall in love with integration testing, so thanks for that anyway :)
Jeremy D. Miller
@jeremydmiller
And there’s always the option of just stealing the code out of Alba, but adapting it to using HttpClient.