简体   繁体   中英

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

Can we run part of Selenium and Karate together? I need to invoke a SOAP service, capture a value from the SOAP response and then pass that value in GUI, and run the GUI test using Selenium. 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 """ When soap action ' http://tempuri.org/Add ' Then status 200 And match /Envelope/Body/AddResponse/AddResult == 5 And print 'response: ', response Then user logs in to the GUI app And passes value of "variable" from the response in field X

Karate can replace Selenium now , you can use Karate for your entire end-to-end flow. Pay attention to point (9).

Also see this answer: https://stackoverflow.com/a/47233301/143475

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM