从 Zalenium/Selenium 下载 UI 测试用例的录制视频 [英] Download recorded video of UI test case from Zalenium/Selenium

查看:39
本文介绍了从 Zalenium/Selenium 下载 UI 测试用例的录制视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 Kubernates 中设置了一个 Zalenium(在云端而不是本地 minikube 或其他任何东西)),它运行良好,一切正常.当我运行带有 recordVideo 功能的测试用例时,Zalenium 会记录测试并将视频存储在容器中,我可以通过 Zalenium 的仪表板访问视频,但我想通过 RemoteWebDriver 以编程方式(而不是通过访问仪表板)下载视频或另外,视频的名称是动态生成的,它由 sessionId(已知)和时间戳组成,这使得客户端无法生成以构建视频文件的 URL,我想知道是否有人已经使用过 Zalenium 并且知道如何下载视频?

I've setup a Zalenium in Kubernates (in the cloud not local minikube or anything else), It works perfectly and everything is OK. When I run a test case with recordVideo capability on, Zalenium records the test and stores a video inside a container, I can access the video via Zalenium's dashboard, but I want to download the video programmatically (not by visiting the dashboard) by RemoteWebDriver or something else, the video's name is dynamically generated and it consists of sessionId (known) and a timestamp which makes it impossible to generate by client to construct a URL to the video file, I wonder if anyone has already experience with Zalenium and knows how to download the video ?

推荐答案

我找到了一个对我的场景有帮助的解决方法,Zalenium 公开了一个 Servlet (DashboardInformationServlet),它提供了有关测试的信息到目前为止,这个 servlet 返回一个对象列表,每个对象描述测试并给出测试视频录制的路径,这些信息足以自动执行我需要采取的进一步步骤.

I found a workaround which it helps in my scenario, Zalenium exposes a Servlet (DashboardInformationServlet) which provides information about tests that have been done so far, this servlet returns a list of objects, each object describes the test and gives a path to the video recording of the test, the information is enough to automate further steps I need to take.

这篇关于从 Zalenium/Selenium 下载 UI 测试用例的录制视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆