webrtc / KITE

KITE is a test engine designed to test WebRTC interoperability across browsers
Apache License 2.0
464 stars 125 forks source link

CancellationException appear after checking for video #163

Open valdrinnz opened 3 years ago

valdrinnz commented 3 years ago

Have been running KITE tests in Jenkins through Docker Swarm.

We set an iteration to run tests continuously. It started well, after 10 tests have been completed successfully, it shows this error

image

Any idea why did this happen, how to fix it or how to prevent it.

namvuCosmo commented 3 years ago

Hi,

This is most likely due to the Executor Service that invokes the test threads stop after a certain duration. This duration is set for each test via an attribute call expectedTestDuration. image

Normally, this expected test duration is set in the function payloadHandling of the baseTest: image

I'm not totally sure that you can set this to be "forever", but probably for long testing purpose, you can set it to be a year or something. Just put a value for expectedTestDuration in the payload of the test. It's in MINUTES, so 1 year would be 525600.

Let me know if this works for you.

valdrinnz commented 3 years ago

I'm writing tests with JavaScript. Can this be achieved in javascript, or only in Java ?

Is enough to handle only from payload, or should add step new step for this or method in main page ?

Thank you.

namvuCosmo commented 3 years ago

i don't know if this would work for JS, we don't have a lot of support for JS libraries, but from your error it looks like it came from Java executor so it might be worth a try.

The Js test when it's launched there would be a separate process from the Java engine, so if this doesn't work, there might be some investigation to be done on the JS side of things.

valdrinnz commented 3 years ago

Hi,

Sorry but earlier I forget to mention that test have been running with video call for 40 mins each test and all of them have implicit wait handling with selenium, mostly with waits and sleeps.

Tried expectedTestDuration locally in kite-apprtc-test, but the duration of tests didn't change. Please check if I'm using it in right way. Screenshot_1

Was looking in KITE-Sample-Tests, found meetingDuration, which was also showing in Hangouts configuration image

Also run Hangouts test and changed dhe meetingDuration value to 60, but test isn't lasting longer than that.

Is there any way right now that we can handle video call duration with KITE by using JavaScript? Does this work for sure using Java?

namvuCosmo commented 3 years ago

Sorry for the late reply, afaik this is working on Java. The expected duration in the config file will be changed during the initiation of the test if the meeting duration is longer. In this case the expected test duration will be set to meeting duration 5 minutes.

What happened when you tried to set it to something longer like 120 (2 hours).

valdrinnz commented 3 years ago

As soon as I try running tests from server with expectedTestDuration, I'll update you.