Aspnetcore.docs: Improve CSAT

Created on 21 Nov 2019  ·  7Comments  ·  Source: dotnet/AspNetCore.Docs

Currently pretty good, but historically it's been low

image

Internal tracking bug


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

P0 Source - Docs.ms doc-enhancement

All 7 comments

@ardalis @guardrex Part of the reason for bad ratings is there's no readme.txt with instructions for getting this working. It needs the following

  • A solution file that integrates the two. SLN are OK to check in when needed, just use force to override .gitignore
  • Instructions on how to run tests

Is this SLN correct:

image

How do you run the tests?

Test > Test Explorer > Run All Tests

They're run the usual way ... dotnet test ... but yeah ... if the topic doesn't say that, it could be a pain point for readers.

IIRC, most of my attention to this was just to keep the sample updated. I don't recall ever getting into the guts of the text.

When I try to run the project download - web site, not test, I get the following
image

System.InvalidOperationException HResult=0x80131509 Message=Cannot resolve scoped service 'TestingControllersSample.Core.Interfaces.IBrainstormSessionRepository' from root provider. Source=Microsoft.Extensions.DependencyInjection

This fixed it

public void Configure(IApplicationBuilder app,
    IWebHostEnvironment env,
    IServiceProvider serviceProvidery)
{
    if (env.IsDevelopment())
    {
        //var repository = app.ApplicationServices.GetService<IBrainstormSessionRepository>();

        var repository = serviceProvidery.GetRequiredService<IBrainstormSessionRepository>();

        InitializeDatabaseAsync(repository).Wait();
    }

LOL, all the tests pass but the web site can't start.

Ah, yes, I see how this slipped thru the cracks.

When I did the upgrade, I ran the app to make sure that the 3.0 updates worked ... _and the app ran fine_.

_BUT_ ...

I test ran the app in the Production environment. 🤦‍♂😄 This line wasn't hit, so the app ran ok. I didn't give it any further thought. 🏃

Well, no biggie probably .... no community dev discovered/reported it.

all the tests pass but the web site can't start.

... and in Production the tests would be _RIGHT!_ :smile:

Was this page helpful?
0 / 5 - 0 ratings