- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 Citrus 的新手,所以我尝试执行
航类预订示例,但我遇到了一些问题。首先,我认为有一点
自述文件错误(https://github.com/christophd/citrus-samples/tree/master/sample-flightbooking 上的 readme.md)。 “转到该文件夹并在 Web 容器中启动 BookStore WebService 应用程序。执行此操作的最简单方法是执行”它似乎是另一个示例自述文件的一部分。
当我执行 mvn jetty:run
时,jetty 服务器启动但我收到了这些消息:
- retrying using FixedBackOff{interval=5000, currentAttempts=4, maxAttempts=unlimited}. Cause: Could not connect to broker URL:tcp://localhost:61616. Reason: java.net.ConnectException: Connectionrefused: connect 11:18:22,197 ERROR ageListenerContainer| Could notrefresh JMS Connection for destination 'Travel.Agency.Request.Queue'
此外,当我尝试 mvn integration-test
(码头服务器运行时)时,测试失败并收到以下消息:
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Timeelapsed: 4.575 s <<< FAILURE! - incom.consol.citrus.samples.flightbooking.FlightBookingIT [ERROR]FlightBookingIT(com.consol.citrus.samples.flightbooking.FlightBookingIT)Time elapsed: 1.514 s <<< FAILURE!com.consol.citrus.exceptions.TestCaseFailedException: Test case failedCaused by: org.springframework.jms.UncategorizedJmsException:Uncategorized exception occurred during JMS processing; nestedexception is javax.jms.JMSException: Could not connect to broker URL:tcp://localhost:61616. Reason: java.net.ConnectException: Connectionrefused: connect Caused by: javax.jms.JMSException: Could not connectto broker URL: tcp://localhost:61616. Reason:java.net.ConnectException: Connection refused: connect Caused by:java.net.ConnectException: Connection refused: connect
在 localhost:61616 上似乎缺少某些东西(我想是 JMS 代理?)。
能否请您指导我如何成功执行示例?
(我正在运行 Windows 10)
最佳答案
很抱歉您对 Citrus 的第一印象不好。您对 README 文件的看法是正确的,这似乎是一个复制粘贴错误。如果会在 repo 中修复它。
要执行的正确 maven 命令是:
mvn clean verify -Dembedded
embedded
参数将激活 POM 中的两个配置文件,activemq-embedded
和 jetty-embedded
。正如他们的名字所暗示的那样,这将启动一个内存中的 ActiveMQ 代理,以及一个 Jetty 服务器,在集成测试运行之前部署了被测系统。
请注意,在其他示例中,例如sample-databind
,README 建议运行 mvn clean install -Dembedded=true
。这几乎是一样的,但我更喜欢 verify
生命周期,因为它不会将工件复制到本地 maven 存储库。此外,配置文件激活的 =true
部分不是必需的,因为一旦属性存在(与其实际值无关)就会激活相应的配置文件,请参阅
<activation>
<property>
<name>embedded</name>
</property>
</activation>
关于testing - Citrus 航类预订样本执行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45564128/
我正在使用 CitrusFramework 进行 Rest API 测试。我已经扫描了该方法,但没有得到任何可以打印响应堆栈跟踪的内容。 问候比杜 最佳答案 我假设您想要分析从被测服务器获得的 HTT
我正在使用 CitrusFramework 进行 Rest API 测试。我已经扫描了该方法,但没有得到任何可以打印响应堆栈跟踪的内容。 问候比杜 最佳答案 我假设您想要分析从被测服务器获得的 HTT
我正在使用静态响应端点适配器返回从资源文件获取的模拟服务响应: private void setAdapterResponse(StaticResponseEndpointAd
我正在尝试使用 citrus 向 sftp 服务器进行身份验证我已经在这样的上下文文件中提供了用户名和密码 当程序正在执行时,我得到一些类似的提示 "KEBROS USERNAME : " 输入用
我正在使用 TestNg 框架来执行柑橘框架测试用例。在下面的代码中,我无法获取柑橘文本上下文对象,在执行测试用例时出现错误 import org.testng.annotations.Optiona
我正在将柑橘支付集成到 Android 应用程序中,在我的交易成功之前,一切都在沙箱中运行良好,但是一旦我的交易成功,我就会看到以下日志: MOTO 成功***{"txMsg":"交易成功","pgR
我是 Citrus 的新手,所以我尝试执行 航类预订示例,但我遇到了一些问题。首先,我认为有一点 自述文件错误(https://github.com/christophd/citrus-samples
使用 Citrus 测试框架对服务器进行测试时,我无法禁用证书检查。 我收到以下错误:org.springframework.web.client.ResourceAccessException:“”
我有一个带有元素 ValidationFault 的 XML 负载。我的验证的一部分是确认 ValidationFault 元素在 XML 负载中仅出现一次。使用以下 Citrus Java DSL:
我一直在研究 Citrus Framework 并下载了示例项目文件夹。运行指令指示如何构建代码、启动 Jetty 服务器以及运行所包含的各种测试。我已经尝试过这个,并且构建仅在第二个模块之后失败。这
我有一组通过Spring Boot实现的微服务,它们通过HTTP REST进行通信。我正在尝试使用Citrus框架设置集成测试。我已经为某些服务成功编写并执行了集成测试,但是正在为更复杂的用例而苦苦挣
我正在评估用于休息服务黑盒测试的 citrus-framework。 有没有办法使用 java DSL 和条件容器根据状态代码进行验证? http(httpActionBuilder -
我正在尝试测试以下两个 REST 调用: 请求 1 GET getLatestVersion Response: {"version": 10} 请求 2 POST getVersionData (b
我想对使用 Netty 构建的套接字服务器进行一些单元测试。 Socket Server 有如下简单的代码: import io.netty.bootstrap.ServerBootstrap; im
背景: 我有一个包含三个服务的简单Spring Boot应用程序。服务通过HTTP REST调用进行通信。以下是对服务的简要说明。 任务计划者(localhost:9100) 编排任务的“计划”。调用
我正在尝试在柑橘行为类中发送 image.jpeg,就我而言,我收到的响应是一个空白页面,这不是我所期望的。 这是我的代码: @Override public void run(Sce
我正在从 AMQ 代理获取消息,并且需要验证纯文本负载。看来 citrus 在纯文本验证方面非常有限,并且验证匹配器无法让我到达需要的位置,因此我需要使用 java 代码来处理它。 代码是使用基本的
我正在尝试通过 Citrus-Framework 发送和接收 TCP 消息,我在其中使用了这个线程作为引用: Receiving messages from tcp server with Citru
我必须将 Citrus 支付网关集成到我的 Android 应用程序中,我们将不胜感激。 website here提前谢谢你。 最佳答案 Citrus 提供了一些真正简化的开发人员指南,以实现高效的技
我正在尝试使用 Citrus Framework 从 JSON 响应中获取一些信息,但我不确定 .extractFromPayload 方法是如何工作的。例如,我发出 GET 请求,JSON 响应为:
我是一名优秀的程序员,十分优秀!