Code Monkey home page Code Monkey logo

cucumber's People

Contributors

asolntsev avatar borisosipov avatar dependabot[bot] avatar robertkielty avatar snuyanzin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cucumber's Issues

Cucumber dataTable

I would like to pass dataTables from scenarios to selenide methods in various ways. Sometimes for selection, sometimes for reading table results and doing an assertion if they are the same.

Would you please advise how to best approach this?

TextReport support for Cucumber+TestNg

Hi,

Have just started to use Selenide and struck while configuring Text report. Can someone please clarify questions around Text report configuration?

 - Does Selenide support generating Text report when configured (or setup) with Cucumber+TestNg
 - Is slf4j mandatory as am already using log2j
 - Where can I see generated Text report, is it in the target folder

Really appreciate the support here as I couldn't found much help around the Text report setup. Also, apologies if this is not right place to post the question (please point me to right place if so).

My Reference so far: https://selenide.org/documentation/reports.html

Thanks.

Tests are skipped because of wrong parameter syntax

e.g.

And   enter a keyword selenide in input field

and corresponding annotation

 @When("a keyword {string} is entered in input field")

in case brackets cucumber requires quotes as mentioned here

besides that after fixing this syntax the test Feature: Google image search starts to fail because there is now no image counter

TextReport()

Does TextReport() works in Cucumber JUnit tests? I try adding it into my project but it did not work.. I don't see any logs.

@Rule
  public TestRule report = new TextReport().onFailedTest(true).onSucceededTest(true);

Thanks!

CucumberException when running `mvn test`

When I run this project, right after cloning it, I get the following error:

io.cucumber.core.exception.CucumberException: Step [enter a keyword (.*) in input field] is defined with 1 parameters at 'org.selenide.examples.cucumber.GoogleImageSearchStepDefinitions.enterKeyword(java.lang.String)'.
However, the gherkin step has 0 arguments.

... and several more errors. Has something changed which requires it to be ran differently?

Here is the entire output:

[simon@simon-pc cucumber]$ mvn clean test
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------< org.selenide.examples:selenide-cucumber >---------------
[INFO] Building selenide-cucumber 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ selenide-cucumber ---
[INFO] Deleting /home/simon/git/cucumber/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ selenide-cucumber ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/simon/git/cucumber/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ selenide-cucumber ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ selenide-cucumber ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ selenide-cucumber ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 3 source files to /home/simon/git/cucumber/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ selenide-cucumber ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.selenide.examples.cucumber.GoogleTest
Feb 24, 2020 5:06:19 PM io.cucumber.junit.Cucumber <init>
WARNING: By default Cucumber is running in --non-strict mode.
This default will change to --strict and --non-strict will be removed.
You can use --strict or @CucumberOptions(strict = true) to suppress this warning
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Starting ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}) on port 7932
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Feb 24, 2020 5:06:20 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[1582560383.406][SEVERE]: Timed out receiving message from renderer: 0.100
[1582560384.275][SEVERE]: Timed out receiving message from renderer: 0.100
[1582560385.094][SEVERE]: Timed out receiving message from renderer: 0.100

Failed scenarios:
classpath:org/selenide/examples/cucumber/google-image-search.feature:2# user can search images by keyword
classpath:org/selenide/examples/cucumber/google-text-search.feature:3# user can search any keyword
classpath:org/selenide/examples/cucumber/google-text-search.feature:10# user can search any keyword in Russian

3 Scenarios (3 failed)
12 Steps (3 failed, 5 skipped, 4 passed)
0m6.222s


io.cucumber.core.exception.CucumberException: Step [enter a keyword (.*) in input field] is defined with 1 parameters at 'org.selenide.examples.cucumber.GoogleImageSearchStepDefinitions.enterKeyword(java.lang.String)'.
However, the gherkin step has 0 arguments.
Step text: enter a keyword selenide in input field
        at io.cucumber.core.runner.PickleStepDefinitionMatch.arityMismatch(PickleStepDefinitionMatch.java:135)
        at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:42)
        at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:64)
        at io.cucumber.core.runner.TestStep.run(TestStep.java:49)
        at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:46)
        at io.cucumber.core.runner.TestCase.run(TestCase.java:51)
        at io.cucumber.core.runner.Runner.runPickle(Runner.java:66)
        at io.cucumber.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:149)
        at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:83)
        at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:24)
        at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
        at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
        at io.cucumber.junit.Cucumber.runChild(Cucumber.java:185)
        at io.cucumber.junit.Cucumber.runChild(Cucumber.java:83)
        at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
        at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
        at io.cucumber.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:219)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
        at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)

io.cucumber.core.exception.CucumberException: Step [a keyword (.*) is entered in input field] is defined with 1 parameters at 'org.selenide.examples.cucumber.GoogleSearchStepDefinitions.enterKeyword(java.lang.String)'.
However, the gherkin step has 0 arguments.
Step text: a keyword selenide is entered in input field
        at io.cucumber.core.runner.PickleStepDefinitionMatch.arityMismatch(PickleStepDefinitionMatch.java:135)
        at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:42)
        at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:64)
        at io.cucumber.core.runner.TestStep.run(TestStep.java:49)
        at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:46)
        at io.cucumber.core.runner.TestCase.run(TestCase.java:51)
        at io.cucumber.core.runner.Runner.runPickle(Runner.java:66)
        at io.cucumber.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:149)
        at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:83)
        at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:24)
        at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
        at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
        at io.cucumber.junit.Cucumber.runChild(Cucumber.java:185)
        at io.cucumber.junit.Cucumber.runChild(Cucumber.java:83)
        at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
        at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
        at io.cucumber.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:219)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
        at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)

io.cucumber.core.exception.CucumberException: Step [a keyword (.*) is entered in input field] is defined with 1 parameters at 'org.selenide.examples.cucumber.GoogleSearchStepDefinitions.enterKeyword(java.lang.String)'.
However, the gherkin step has 0 arguments.
Step text: a keyword "селенид тесты" is entered in input field
        at io.cucumber.core.runner.PickleStepDefinitionMatch.arityMismatch(PickleStepDefinitionMatch.java:135)
        at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:42)
        at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:64)
        at io.cucumber.core.runner.TestStep.run(TestStep.java:49)
        at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:46)
        at io.cucumber.core.runner.TestCase.run(TestCase.java:51)
        at io.cucumber.core.runner.Runner.runPickle(Runner.java:66)
        at io.cucumber.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:149)
        at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:83)
        at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:24)
        at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
        at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
        at io.cucumber.junit.Cucumber.runChild(Cucumber.java:185)
        at io.cucumber.junit.Cucumber.runChild(Cucumber.java:83)
        at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
        at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
        at io.cucumber.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:219)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
        at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)


[ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 6.479 s <<< FAILURE! - in org.selenide.examples.cucumber.GoogleTest
[ERROR] user can search images by keyword(Google image search)  Time elapsed: 4.976 s  <<< ERROR!
io.cucumber.core.exception.CucumberException: 
Step [enter a keyword (.*) in input field] is defined with 1 parameters at 'org.selenide.examples.cucumber.GoogleImageSearchStepDefinitions.enterKeyword(java.lang.String)'.
However, the gherkin step has 0 arguments.
Step text: enter a keyword selenide in input field

[ERROR] user can search any keyword(Google text search)  Time elapsed: 0.944 s  <<< ERROR!
io.cucumber.core.exception.CucumberException: 
Step [a keyword (.*) is entered in input field] is defined with 1 parameters at 'org.selenide.examples.cucumber.GoogleSearchStepDefinitions.enterKeyword(java.lang.String)'.
However, the gherkin step has 0 arguments.
Step text: a keyword selenide is entered in input field

[ERROR] user can search any keyword in Russian(Google text search)  Time elapsed: 0.3 s  <<< ERROR!
io.cucumber.core.exception.CucumberException: 
Step [a keyword (.*) is entered in input field] is defined with 1 parameters at 'org.selenide.examples.cucumber.GoogleSearchStepDefinitions.enterKeyword(java.lang.String)'.
However, the gherkin step has 0 arguments.
Step text: a keyword "селенид тесты" is entered in input field

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   Step [enter a keyword (.*) in input field] is defined with 1 parameters at 'org.selenide.examples.cucumber.GoogleImageSearchStepDefinitions.enterKeyword(java.lang.String)'.
However, the gherkin step has 0 arguments.
Step text: enter a keyword selenide in input field
[ERROR]   Step [a keyword (.*) is entered in input field] is defined with 1 parameters at 'org.selenide.examples.cucumber.GoogleSearchStepDefinitions.enterKeyword(java.lang.String)'.
However, the gherkin step has 0 arguments.
Step text: a keyword "селенид тесты" is entered in input field
[ERROR]   Step [a keyword (.*) is entered in input field] is defined with 1 parameters at 'org.selenide.examples.cucumber.GoogleSearchStepDefinitions.enterKeyword(java.lang.String)'.
However, the gherkin step has 0 arguments.
Step text: a keyword selenide is entered in input field
[INFO] 
[ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.414 s
[INFO] Finished at: 2020-02-24T17:06:26+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project selenide-cucumber: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/simon/git/cucumber/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.