Skip to content

Add support for Cucumber-JVM 3 #225

Merged
baev merged 3 commits into
allure-framework:masterfrom
Frameworkium:master
Jun 13, 2018
Merged

Add support for Cucumber-JVM 3 #225
baev merged 3 commits into
allure-framework:masterfrom
Frameworkium:master

Conversation

@noronhaa
Copy link
Copy Markdown
Contributor

[//]: # (
. Thank you so much for sending us a pull request!
.
. Make sure you have a clear name for your pull request.
. The name should start with a capital letter and no dot is required in the end of the sentence.
. To link the request with isses use the following notation: (fixes #123, fixes #321)
.
. An example of good pull request names:
. - Add Russian translation (fixes #123)
. - Add an ability to disable default plugins
. - Support emoji in test descriptions
)

Context

  • Created a separate module for an Allure Cucumber-JVM 3 Listener (allure-cucumber3-jvm).
  • Uses same classes from allure-cucumber2-jvm but has a cucumber-core and cucumber-java version 3.0 dependency instead.
  • Where appropriate all depreciated or no longer existing methods (as of version 3.0) have been removed in favour of casting as outlined in the cucumber docs.
  • Produces an identical report to using allure-cucumber2-jvm with Cucumber-JVM 2.

Usage:

  • Add Dependency (only from local build at the moment)
    <dependency>
      <groupId>io.qameta.allure</groupId>
      <artifactId>allure-cucumber3-jvm</artifactId>
      <version>2.7-SNAPSHOT</version>
    </dependency>
  • Add plugin to cucumber runner:
    plugin = {"io.qameta.allure.cucumber3jvm.AllureCucumber3Jvm"},

Checklist

  • Sign Allure CLA
  • Provide unit tests (same tests present as in allure-cucumber2-jvm for comparison)

Copy link
Copy Markdown
Member

@baev baev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general

@@ -0,0 +1,309 @@
package io.qameta.allure.cucumber3jvm;

import cucumber.api.*;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not use wildcard imports

/**
* Parts of package-private cucumber.runtime.formatter.TestSourcesModel needed for Allure 2 adapter.
*/
public final class CucumberSourceUtils {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets make it package private or move to internal package

@bad
Scenario: Bad scenario with background
When I add a to b
Then result is 16 No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure all the files ends with new line

…vate, added new line at end of feature files
@noronhaa
Copy link
Copy Markdown
Contributor Author

Added requested changes

@baev
Copy link
Copy Markdown
Member

baev commented Jun 12, 2018

@letsrokk could you please review this?

@noronhaa you may need to specify your git emails in Github profile in order to link the commits to it

@letsrokk
Copy link
Copy Markdown
Contributor

@baev @noronhaa looks good to me in general

Although I do have suggestion for future improvement/refactoring - we need to think on how we can reduce code duplication here as I can see that some helper and utils classes were just copied for new adapter

Maybe we can introduce common shared module with such classes etc., but scope of this changes should be outside this PR. I'll have a look at it when we will have hands on new major Allure 3 version

@baev baev merged commit 12398e6 into allure-framework:master Jun 13, 2018
@baev
Copy link
Copy Markdown
Member

baev commented Jun 13, 2018

@noronhaa @letsrokk thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enum class cast exception when using varargs generic constant parameter in step

3 participants