如何为所有功能文件全局设置SSL [英] How to set the ssl globally for all the feature files

查看:58
本文介绍了如何为所有功能文件全局设置SSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为我们自动化的一部分,我们需要设置ssl证书.

As Part of our automation we need to set the ssl certificate.

如果我在功能文件中进行设置(如下所示),则可以正常工作.但是我有大量的功能文件,并且想要在全局范围内定义它,以便在所有功能文件中都使用此ssl.

If I am setting in the feature file (as shown below) it works perfectly fine. But I have huge number of feature files and want to define this globally so that this ssl is used in all the feature files.

并配置ssl = {keyStore:'wmcloudPreProd2_truststore.jks',keyStorePassword:'manage',keyStoreType:'jks'};

And configure ssl = { keyStore: 'wmcloudPreProd2_truststore.jks', keyStorePassword: 'manage', keyStoreType: 'jks' };

寻找一种方法来定义此ssl配置,以用于完整的自动化项目.

Looking for a way to define this ssl configuration for complete automation project.

预先感谢

推荐答案

容易,在 karate-config.js 中,您可以执行以下操作:

Easy, in karate-config.js you can do:

karate.configure('ssl', { keyStore: 'wmcloudPreProd2_truststore.jks', keyStorePassword: 'manage', keyStoreType: 'jks' });

文档中提到了这一点: https://github.com/intuit/karate#configure

This is mentioned in the doc: https://github.com/intuit/karate#configure

这篇关于如何为所有功能文件全局设置SSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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