簡體   English   中英

如何同時使用空手道和 Selenium 使用 Cucumber 編寫端到端測試用例?

[英]How to use both Karate and Selenium to write an end to end test case using Cucumber?

我們可以同時運行 Selenium 和空手道的一部分嗎? 我需要調用 SOAP 服務,從 SOAP 響應中捕獲一個值,然后在 GUI 中傳遞該值,然后使用 Selenium 運行 GUI 測試。 So- how can we create a single Test Runner- which can include @Runwith- for both- Cucumber.class and Karate.class- To write a Scenario in a feature file something like this- Scenario: soap 1.1 Given request """ 2 3 """ 當 soap action ' http://tempuri.org/Add ' 然后狀態 200 並匹配 /Envelope/Body/AddResponse/AddResult == 5 並打印 'response: ', response 然后用戶登錄到 GUI 應用並從字段 X 的響應中傳遞“變量”的值

空手道現在可以代替 Selenium ,您可以將空手道用於您的整個端到端流程。 注意第(9)點。

另請參閱此答案: https://stackoverflow.com/a/47233301/143475

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM