karate

Karate framework - mock server define thread pool

て烟熏妆下的殇ゞ 提交于 2021-02-05 08:13:11
问题 I'm using karate framework for load testing and ruining mock server using following command with -T option to achive higher tps and it seems it is not effected and its always run 8 threads which is number of cores in the server. java -jar karate-0.9.5.RC5.jar -T 100 -m featurefilename.feature -p 8080 Kindly help to define thread pool count for the karate mock server. 回答1: This is not currently supported. I can also confirm that this is not a priority for the project. You are welcome to

Karate framework - mock server define thread pool

佐手、 提交于 2021-02-05 08:11:40
问题 I'm using karate framework for load testing and ruining mock server using following command with -T option to achive higher tps and it seems it is not effected and its always run 8 threads which is number of cores in the server. java -jar karate-0.9.5.RC5.jar -T 100 -m featurefilename.feature -p 8080 Kindly help to define thread pool count for the karate mock server. 回答1: This is not currently supported. I can also confirm that this is not a priority for the project. You are welcome to

UI automation code on a frame, works fine in Chrome/MSEdge but fails in Firefox and Safari

我只是一个虾纸丫 提交于 2021-02-05 08:09:53
问题 I'm using Karate v0.9.6.RC1. The code is something like this: * switchFrame(1) And input('input[name='cardnumber']','xxxxxxx') This works fine in Chrome or Edge browser but fails in Firefox or Safari. I tried using different methods like Click, Input, Retry etc after switching to frame but Firefox/Safari doesn't even recognise the object. Also tried different locators. It fails with the below error: 21:14:08.687 request: 101 > POST http://localhost:4444/session/803f524c-3eda-8d46-b1f3

UI automation code on a frame, works fine in Chrome/MSEdge but fails in Firefox and Safari

最后都变了- 提交于 2021-02-05 08:09:33
问题 I'm using Karate v0.9.6.RC1. The code is something like this: * switchFrame(1) And input('input[name='cardnumber']','xxxxxxx') This works fine in Chrome or Edge browser but fails in Firefox or Safari. I tried using different methods like Click, Input, Retry etc after switching to frame but Firefox/Safari doesn't even recognise the object. Also tried different locators. It fails with the below error: 21:14:08.687 request: 101 > POST http://localhost:4444/session/803f524c-3eda-8d46-b1f3

Karate API Testing- Remove duplicate values from the response and compare it with the new response

 ̄綄美尐妖づ 提交于 2021-02-05 08:09:13
问题 I have a scenario where in response I receive duplicate values. And def abcName = $ListDataSet_Response.rowData[*].4 And print abcName [ "BP Part Sht NCA MS", "BP Part Sht NCA MS", "BP Part Sht NCA MS", "BP Part Sht NCA MS", "BP Part Sht NCA MS", "Bay Pond USB, Inc MS", "Bay Pond USB, Inc MS", "BP USB III Inc MS", "BP USB III Inc MS", "BP USB III Inc MS", "BP USB III Inc MS", "BP CS Sht NCA", "BP CS Sht NCA", "BP CS Sht NCA", "BP CS Sht NCA", "BP USB IV, Inc MS", "BP Mrts Block NCA MS", "BP

How to debug through a karate testing project using Maven?

删除回忆录丶 提交于 2021-02-05 08:06:28
问题 Is there a way I can debug through the test in a similar way that I would debug a Java app using Maven? For example, if I set breakpoint in the implementstion of step and click on debug with next parameters of CL: mvn clean test -Dkarate.options="--tags ~@ignore" -Dtest=MainRunner -DforkCount=0 and I'm getting next errors: [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ karateSberApi --- [WARNING] useSystemClassloader setting has no effect when not forking [INFO] Running

How to debug through a karate testing project using Maven?

喜夏-厌秋 提交于 2021-02-05 08:06:00
问题 Is there a way I can debug through the test in a similar way that I would debug a Java app using Maven? For example, if I set breakpoint in the implementstion of step and click on debug with next parameters of CL: mvn clean test -Dkarate.options="--tags ~@ignore" -Dtest=MainRunner -DforkCount=0 and I'm getting next errors: [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ karateSberApi --- [WARNING] useSystemClassloader setting has no effect when not forking [INFO] Running

Karate mock - how to match against request body content

霸气de小男生 提交于 2021-02-05 07:52:06
问题 With Karate, I'm trying to work out how to return different mock responses based on the content of the request body. I've got Feature: ... Scenario: pathMatches('/users/login') && methodIs('post') && request == {"username": "gooduser", "password": "goodpassword"} * def responseStatus = 200 * def response = {"status: login ok"} Scenario: pathMatches('/users/login') && methodIs('post') && request == {"username": "baduser", "password": "badpassword"} * def responseStatus = 401 * def response = {

call the first feature from the second feature file, failed without specified clue

…衆ロ難τιáo~ 提交于 2021-02-05 07:51:30
问题 Run the first.feature file successfully,however, call it from the second.feature failed without any clue to analysis. Do you have any idea help me find the root cause? The source of my first.feature: Feature: 采样管理-样本登记 Background: 读取随机生成的条形码、手机号、采样类型等作为入参 * url baseURL * def randomData = Java.type('utils.RandomData') * def barcode = randomData.getRandom(11) * def randomPhone = randomData.getTelephone() * def sampletype = randomData.getNum(0,1) Scenario: 输入合法参数进行正常样本登记,确认能够登记成功 Given path

Karate UI: unable to find the child element using friendly locator and looking for some alternatives

我怕爱的太早我们不能终老 提交于 2021-02-05 07:51:11
问题 Looking for an alternative of findElement.findElement like in selenium. I have tried chainable keywords available in like friendly locators but none of them worked. I want to get the text of 'p' and I can achieve it by using XPath however in selenium we could use findElement($parentDiv).findElement($p) will work. <div class="example"> <span class="new"></span> <p>Random Text</p> </div> Xpath will fail if there are any new changes in the UI however findElement.findElement won't. Does Karate-UI