Skip to content

stebet/Stebet.SignalR.NATS

Repository files navigation

codecov

Building and Testing Instructions

Prerequisites

Before you begin, ensure you have the following installed:

For integration tests:

  • NATS Server running on localhost:4222 to run integration tests. For ease of use you can run it via. Docker by running docker run -p 4222:4222 -p 8222:8222 --name nats -d nats:latest in your terminal.

For load tests:

Building the Solution

  1. Clone the repository to your local machine using Git
  2. Navigate to the cloned repository's directory
  3. Run dotnet build --tl to build the solution

Running Tests

This solution includes some integration tests. To run them, follow these steps:

  1. Ensure the NATS Server is running on your local machine on port 4222. You can run it by downloading the NATS Server binary or by running it in docker using the following command: docker run -p 4222:4222 -p 8222:8222 --name nats -d nats:latest
  2. Run the tests using the .NET CLI by running dotnet test in the root directory of the repository.

Running Load Tests

There are also load tests included in the solution. To run them, follow these steps:

  1. Make sure you are in the root directory of the repository
  2. Publish the solution by running dotnet publish -c Release --os linux -t:PublishContainer.
  3. Start the docker compose file by running docker compose -f .\docker-compose-nats.yml -p signalr-nats up -d.
    • Note: There is also a Docker Compose file to start the Redis backplane for comparison purposes. You can start it by running docker compose -f .\docker-compose-redis.yml -p signalr-redis up -d.
  4. Run the performance tests by running dotnet run -c Release --project .\perf\Stebet.SignalR.NATS.LoadTest\Stebet.SignalR.NATS.LoadTest.csproj.

Viewing Code Coverage

The project is configured to generate code coverage reports with Codecov. To view the coverage report, follow the badge link in the README.md file or visit Codecov directly.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages