SpecFlow BDD testing with Signalr.

Anonymous
2021-12-22T11:56:03.237+00:00

Hi Team,

I'm trying to write BDD tests for a code that includes signalr code, when I subscribe to a method and call the same from a server code (.SendAsync) the subscribed method in hubConnection.On is not getting called. The same set of code works in Test project, but same thing when I try to do in SpecFlow BDD, it does not work. Is this even feasible, if yes then please let me know how.

Thanks in Advance.

Developer technologies ASP.NET Other
Developer technologies C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2021-12-22T15:50:39.927+00:00

    Your BDD tests should not use signal/r. This is an indication that you are not following BDD practices and are tightly coupling your logic.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.