dotnet / dotnet/AspNetCore.Docs

How to Unit Test SignalR

Open
#11,052 21 comments 38 reactions 1 assignee Claimed by @meaghanlewis View on GitHub
doc-bug SignalR
Dominant language
C#
Stars
13.1k
Forks
24.6k
Avg merge
1d 3h
Merged PRs (30d)
97

Description

**Doc request for unit testing signalr in a ASP.NetCore 2.2 app**
I am currently working on a signalr application and I want to be able to test my hubs. I couldn't find any information about unit testing signalr in AspNetCore/SignalR. The only information that i could find was from 2013 for AspNet/SignalR and is pretty outdated.

I am sugesting to put the topic about unit testing signalr on this location:

Docs/ASP.NET/ASP.NET Core/ASP.NET Core 2.2/Real-time apps/Unit testing
or
Docs/ASP.NET/ASP.NET Core/ASP.NET Core 2.2/Test, debug and roubleshoot/Unit testing/signalr hubs

This topic will cover the following topics:
Testing of hubs, testing of groups and examples.

A rough outline:

- Prerequisites
- Testing hubs
-- Using MSTest
-- Using NUnit
-- Using xUnit
- Testing groups
-- Using MSTest
-- Using NUnit
-- Using xUnit
- Examples

I hope this gets added because there is not a lot of information on this topic.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.