3

当我运行我的第一个脚本时,我看到了下面的错误。

com.intuit.karate.exception.KarateException:http 调用在 702 毫秒后失败,网址为:https://qa.myorg.intVersion

这是我的功能文件。

Feature: Test feature 
Scenario: Verify my service is up and running
Given url 'https://qa.myorg.int\Version'
When method get
Then status 200

这是我的Java文件:

package examples
import org.junit.runner.RunWith
import com.intuit.karate.junit4.Karate
@RunWith(Karate.class)
public class jenkinsTest {
}

我在调试模式下手动等待了很长时间。尽管如此,我还是看到了下面的错误,并且没有将 HTML 报告加载到目标文件夹中。(我在目标文件夹下只看到 Karate.log。)

11:36:23.751 [main] 错误 com.intuit.karate - javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到有效请求目标的认证路径,http 调用在 271489 毫秒后失败 URL:https ://qa.myorg.int/Version

我该如何解决?

4

1 回答 1

3

请参阅configureSSL 的文档。尝试这个:

Feature: Test feature

Background:
* configure ssl = true

Scenario: Verify my service is up and running
Given url 'https://qa.myorg.int/Version'
When method get
Then status 200
于 2017-08-11T16:59:18.067 回答