Open sanghviharshit opened 7 years ago
Hub can already do this right? I do it like this and get testcase execution video from hub
url = "http://HubSeverIP:3000/download_video/" + sessionId + ".mp4";
@shankarkc you are just downloading the video after your test case is executed. By default video capture is limited to 2 minutes. When you want to explicitly start and stop video recording, you have to send the respective command to the node which is executing your test. I am hoping to send the start/stop command to the hub directly and let hub relay it to correct node based on session id. This way, you don't need direct access to the node when you are running a largely distributed selenium grid where the nodes could be behind a firewall that your test script can't directly access.
@sanghviharshit sorry I dont have a clear picture of your setup. Grid extra records the video by default for you at no cost. I didnt get why you want to start and stop the recording. Selenium Hub always copies the test execution video. So you dont have to access the nodes directly. In my case each test case starts a new session...extra starts video recording automatically. when test fails/ends it stops ends recording. I just copy the video at the end of execution depending on my test status. You can get it using Hubs URL as i shown above. I have a grid extra with 60 nodes (multi machine docker selenium grid Extra grid) running 1500+ tests. In my case jenkins slave cannot access the node videos directly. But as jenkins slave can access the hub it downloads videos from all the nodes using Hubs URL. Its working fine for me. I have not seen any time limits for video recordings. Are u facing any issues wrt length of videos? Videos you have getting stripped to 2 min?
Hub can accept the video recording command for a session and forward it to the node automatically as hub is already aware of the sessions and map the request to correct node. It'd be great if the hub can also show the recorded videos from the node machines - #301