cucumber

cucumber re-run failed scenarios automatically with a tag?

泄露秘密 提交于 2021-02-06 15:26:11
问题 In our build there are certain scenarios that fail for reasons which are out of our control or take too long to debug properly. Things such asynchronous javascript etc. Anyway the point is sometimes they work sometimes they don't, so I was thinking it would be nice to add a tag to a scenario such as @rerun_on_failure or @retry which would retry the scenarion X number of times before failing the build. I understand this is not an ideal solution, but the test is still valuable and we would like

Question about Karate test case for POST method

◇◆丶佛笑我妖孽 提交于 2021-02-05 08:16:41
问题 I have an endpoint URL, within Swagger I must pass certain fields to test the POST method. I was wondering if anyone had an example of how to set up a Karate test for a POST method? 回答1: Yes, there are plenty in the documentation: https://github.com/intuit/karate If you follow the quickstart, you will get a sample project with a working POST: https://github.com/intuit/karate#quickstart Scenario: create a user and then get it by id * def user = """ { "name": "Test User", "username": "testuser"

Question about Karate test case for POST method

五迷三道 提交于 2021-02-05 08:16:27
问题 I have an endpoint URL, within Swagger I must pass certain fields to test the POST method. I was wondering if anyone had an example of how to set up a Karate test for a POST method? 回答1: Yes, there are plenty in the documentation: https://github.com/intuit/karate If you follow the quickstart, you will get a sample project with a working POST: https://github.com/intuit/karate#quickstart Scenario: create a user and then get it by id * def user = """ { "name": "Test User", "username": "testuser"

Attach screenshot to cucumber-html-reporter using cucumber-tsflow and protractor

两盒软妹~` 提交于 2021-02-05 08:10:53
问题 After every failed scenario, I would like to attach a screenshot to html report (generated by cucumber-html-reporter, using cucumber-tsflow and protractor. Is that possible? As far as I understand, I don't have access to the world instance anymore when writing the steps using cucumber-tsflow. Otherwise something like this.attach(screenshot, 'image/png'); would have done the trick. After googling for a while, I saw some people attaching the screenshot to the scenario like scenario.attach

cucumber throwing java.lang.NoClassDefFoundError: io/cucumber/core/gherkin/FeatureParser

限于喜欢 提交于 2021-02-05 06:48:25
问题 I'm learning Cucumber and I'm getting the FeatureParser error java.lang.NoClassDefFoundError: io/cucumber/core/gherkin/FeatureParser I have imported below jar files gherkin-9.2.0.jar cucumber-core-5.2.0.jar cucumber-java-5.2.0.jar cucumber-junit-5.2.0.jar cucumber-jvm-deps-1.0.6.jar cucumber-plugin-5.2.0.jar i have written code like below LoginTestRunner.java package cucumberTests; import org.junit.runner.RunWith; import io.cucumber.junit.Cucumber; import io.cucumber.junit.CucumberOptions;

'ERROR Mongo::OperationFailure' from Cucumber testing with rails on mongoid-gridfs

我怕爱的太早我们不能终老 提交于 2021-02-05 02:51:41
问题 I am getting this weird error while running cucumber test: ERROR Mongo::OperationFailure: Database command 'filemd5' failed: {"errmsg"=>"exception: best guess plan requested, but scan and order required: query: { files_id: ObjectId('4d1abab3a15c84139c00006e') } order: { files_id: 1, n: 1 } choices: { $natural: 1 } ", "code"=>13284, "ok"=>0.0} I have a list of similar scenarios, where first scenario passes but all the other following scenario fails. I searched for it and I found that there is

'ERROR Mongo::OperationFailure' from Cucumber testing with rails on mongoid-gridfs

耗尽温柔 提交于 2021-02-05 02:50:44
问题 I am getting this weird error while running cucumber test: ERROR Mongo::OperationFailure: Database command 'filemd5' failed: {"errmsg"=>"exception: best guess plan requested, but scan and order required: query: { files_id: ObjectId('4d1abab3a15c84139c00006e') } order: { files_id: 1, n: 1 } choices: { $natural: 1 } ", "code"=>13284, "ok"=>0.0} I have a list of similar scenarios, where first scenario passes but all the other following scenario fails. I searched for it and I found that there is

'ERROR Mongo::OperationFailure' from Cucumber testing with rails on mongoid-gridfs

耗尽温柔 提交于 2021-02-05 02:50:07
问题 I am getting this weird error while running cucumber test: ERROR Mongo::OperationFailure: Database command 'filemd5' failed: {"errmsg"=>"exception: best guess plan requested, but scan and order required: query: { files_id: ObjectId('4d1abab3a15c84139c00006e') } order: { files_id: 1, n: 1 } choices: { $natural: 1 } ", "code"=>13284, "ok"=>0.0} I have a list of similar scenarios, where first scenario passes but all the other following scenario fails. I searched for it and I found that there is

mvn test doesn't fail when Cucumber scenario fails

混江龙づ霸主 提交于 2021-01-29 11:13:25
问题 I have a RunCucumberTest class as described in the JUnit section here and a Cucumber scenario that fails when run from the gutter icon in IntelliJ. However, why does mvn test build successfully? [WARNING] Tests run: 482, Failures: 0, Errors: 0, Skipped: 12 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 02:10 min [INFO] Finished at:

Code Coverage for Cucumber Tests using Jacoco

妖精的绣舞 提交于 2021-01-29 10:52:17
问题 I am trying to integrate Jacoco to get the code coverage for my Cucumber tests using Maven. Following is my project structure: -src-main-java-Pages -src-main-java-Helper -src-test-java-resources-features -src-test-java-Steps Following is the Jacoco configuration in my POM.xml <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.8.2</version> <configuration> <destFile>${basedir}/target/coverage-reports/jacoco.exec</destFile> <dataFile>${basedir}/target