cucumber-jvm

possible values for @CucumberOptions(plugin = …)

*爱你&永不变心* 提交于 2021-02-10 05:47:11
问题 I am using @CucumberOptions(plugin = {"pretty"} for test report in cucumber but the default colors for this are really bad..so I am looking to change the font color in output report. Anyone as any idea..how proceed further? 回答1: For console colors see Console-Colours. For reports you can specify that the report be output in JSON and then pass the generated JSON to a custom formatter. See Custom-Formatters. BTW, this is how TeamCity creates its reports. Here is an example of generating both

Combine Multiple json results in one, updated Cucumber-JVM Report

走远了吗. 提交于 2021-02-07 08:21:34
问题 I have two runners in my automation project as follows: Main runner - Executes all the @ui-test tagged test cases and if a scenario is failed target/rerun.txt will be populated with the scenario location (e.g. features/Dummy.feature:22 ): @RunWith(Cucumber.class) @CucumberOptions( features = "classpath:features", plugin = {"pretty", "html:target/cucumber-html-report", "json:target/cucumber.json", "rerun:target/rerun.txt"}, tags = {"@ui-test", "~@ignore"} ) public class RunCukesTest { }

Combine Multiple json results in one, updated Cucumber-JVM Report

元气小坏坏 提交于 2021-02-07 08:15:23
问题 I have two runners in my automation project as follows: Main runner - Executes all the @ui-test tagged test cases and if a scenario is failed target/rerun.txt will be populated with the scenario location (e.g. features/Dummy.feature:22 ): @RunWith(Cucumber.class) @CucumberOptions( features = "classpath:features", plugin = {"pretty", "html:target/cucumber-html-report", "json:target/cucumber.json", "rerun:target/rerun.txt"}, tags = {"@ui-test", "~@ignore"} ) public class RunCukesTest { }

org.openqa.selenium.WebDriverException: disconnected: not connected to DevTools error using ChromeDriver Chrome using Selenium and Java

五迷三道 提交于 2021-02-04 08:18:06
问题 I am seeing below error and browser got disconnected between. Its happening only for chrome. Selenium version I am using is: <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.141.59</version> Error stack trace: [1579632222.785][SEVERE]: Unable to receive message from renderer org.openqa.selenium.WebDriverException: disconnected: not connected to DevTools (Session info: chrome=79.0.3945.117) Build info: version: '3.141.59', revision: 'e82be7d358',

I need to have an gradle task to execute my cucumber runner class and execute cucumber tets

匆匆过客 提交于 2021-01-29 06:39:48
问题 I have my Cucumber Runner class as shown below and i need to call and run this runner class through gradle so that in turn it executes my stepdefinition / tests as we do it in normal cucumber project import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeSuite; import com.inspire.brands.helper.reporter.ReporterUtil; import io.cucumber.testng.AbstractTestNGCucumberTests; import io

Load wiremock stub files

对着背影说爱祢 提交于 2021-01-29 05:50:33
问题 I wanted to load all my wiremock stub files before start-up my cucumber-jvm tests. As per wiremock docs via API only one file can be pushed. Not bulk. I was think using java code within the test project before kick-off tests. Whats would be the best way of doing this through the code. 回答1: By calling wiremock api you can upload multiple stubs in one go as per below solution. Solution Try POSTing it to http://localhost:8080/__admin/mappings/import 来源: https://stackoverflow.com/questions

Cucumber: Class not found com.example.runner.RunnerTest

删除回忆录丶 提交于 2021-01-24 11:47:29
问题 I have a maven project to run cucumber and selenium . The *.feature files are defined in the src/features , and the steps are defined in the src/test/java/com/example/steps . I have also defined a test runner class as below: package com.example.runner; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions( features={"src/features"}, glue="com/example/steps") public class RunnerTest { } The problem is

Cucumber: Class not found com.example.runner.RunnerTest

喜你入骨 提交于 2021-01-24 11:46:45
问题 I have a maven project to run cucumber and selenium . The *.feature files are defined in the src/features , and the steps are defined in the src/test/java/com/example/steps . I have also defined a test runner class as below: package com.example.runner; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions( features={"src/features"}, glue="com/example/steps") public class RunnerTest { } The problem is

How to get all the cucumber scenario steps in before hook?

白昼怎懂夜的黑 提交于 2021-01-07 06:35:53
问题 I want to access all the cucumber scenario steps in @before hook. Is there a way to do this? I have tried passing the cucumber scenario object in the before hook method but it only provides the basic info like scenario.getName() , scenario.getId() . What I require is something like getSteps() which give me the List<String> of all the steps of that particular scenario. What I am looking for is something like this @Before("@dev") public void testcase(Scenario scenario){ for (Step a : scenario

Cucumber : How to read examples from external excel file for Scenarios Outline

南楼画角 提交于 2021-01-02 11:55:32
问题 My requirement is to read examples from external excel file rather than hard code it into feature file. I have more than 100 examples which is difficult to maintain in feature file. Can you please help me on this. Here is my scenario - Scenario Outline: Browser Test When I visit the URL <base>/<page>/<ordNumber>/<custName> Then the browser contains test <custNumber> Examples: | base | page | ordNumber | custName | | http://www.stackoverflow.com | orders | 123 | John | | http://www