为业力赛跑者设置静态路径

问题描述

我对业力测试不熟悉,但是我能够准备要测试的OpenUI5应用程序。我的测试工作目录出现问题,因为对于我的测试,我需要使用预先填充的sqlite3数据库。为了进行测试,我使用了带有参数'--user-data-dir =“ C:\ tmp” --profile-directory =“ karma”'的chrome,并且可以将此文件放入chrome配置文件路径。但是我无法使用业力执行此操作,因为业力始终以路径(karma-xxxxxx)中随机生成的ID开头。

我正在尝试使用上述chrome参数运行自定义浏览器配置,但它也无法正常工作。

module.exports = function(config) {
    "use strict";

    var chromeFlags = [
        "--window-size=1280,1024","--disable-web-security","--allow-file-access-from-files",'--user-data-dir="C:\\tmp"','--profile-directory="karma"'
    ];

    config.set({

        basePath: '',ui5: {
            type: "application",preload: 'async',animation: 'false',paths: {
                webapp: "www",// application
            }
        },frameworks: ["ui5"],browsers: ["CustomChrome"],browserConsoleLogOptions: {
            level: "error"
        },customLaunchers: {
            CustomChrome: {
                base: "Chrome",flags: chromeFlags
            },CustomChromeHeadless: {
                base: "ChromeHeadless",flags: chromeFlags
            }
        },});
};

使用此配置,Chrome总是以这种方式启动,因此自动测试无法正常工作:

enter image description here

我还应该做什么? 谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...