For some scenarios, you just want to validate something that isn’t directly related to WebRTC. testRTC by default assumes that you want WebRTC sessions, so if it can’t find any WebRTC connection with some audio or video data in it in your test results, it will fail the test automatically, with the error “No WebRTC Data collected” thrown.
To avoid that and remove this status error and check from your test script, you can add the
following code into your test
script:
// Make sure we don't fail because of no media
client
.rtcSetTestExpectation("video.in == 0")
.rtcSetTestExpectation("audio.in == 0")
.rtcSetTestExpectation("video.out == 0")
.rtcSetTestExpectation("audio.out == 0");
The code snippet above instructs testRTC to ignore cases where no media is sent or received in the test scenario.