Skip to content

Creating the ASP.NET Core Web App

Tom Longhurst edited this page Nov 30, 2021 · 4 revisions

Firstly, create a .NET 6 Web App. Visual Studio should be able to create you one from a template.

Visual Studio > New Project > ASP.NET Core Web Application (C#)

Remove any unwanted controllers/views created by the template.

Install the NuGet package BDTest.NetCore.Razor.ReportMiddleware

In your startup class, inside public void ConfigureServices(IServiceCollection services) call:

            services
                .AddRazorPages()
                .AddBdTestReportControllersAndViews();

And in public void Configure(IApplicationBuilder app, IWebHostEnvironment env), call:

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapRazorPages();
                endpoints.MapControllers();
            });

That's it! Boot up your server! You should be able to navigate to the endpoint /bdtest/report/test-runs and see a UI with an empty test list. Right now we've set up no backing store, so everything sent to your report server is in memory. So if your server gets rebooted, then you'll lose your test data.

Clone this wiki locally