Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scenario Steps(Given,When,Then) are not shown in IntelliJ console. #1804

Closed
skumar1122 opened this issue Sep 10, 2019 · 3 comments
Closed

Scenario Steps(Given,When,Then) are not shown in IntelliJ console. #1804

skumar1122 opened this issue Sep 10, 2019 · 3 comments
Labels
can't-fix We don't know how to do this at the moment

Comments

@skumar1122
Copy link

skumar1122 commented Sep 10, 2019

Hello,

When I am running my tests in local, I cannot see Feature-Scenario steps in my IntelliJ console. Usually you see all Given,When,And,Then steps with each scenario. I am not sure if this option is not available with serenity but I think I have used in Cucumber-Junit framework.

My serenity versions in pom:
<serenity.version>2.0.60</serenity.version> <serenity.cucumber.version>1.9.40</serenity.cucumber.version>

And I do have Cucumber-Java Plugin installed in IntelliJ.

And IntelliJ Idea Version - Community 2019 - 192.5728.xx

Screenshot 2019-09-10 at 16 53 19

Could someone advice on this ?

Thanks
Shiva

@wakaleo
Copy link
Member

wakaleo commented Sep 10, 2019

IntelliJ will only do that if you run the feature file directly, not via the Junit runner. But you need the Junit runner for Serenity. So at the moment, this isn't supported.

@skumar1122
Copy link
Author

Thanks @wakaleo for letting me know.

@wakaleo wakaleo added the can't-fix We don't know how to do this at the moment label Sep 10, 2019
@scormaq
Copy link
Contributor

scormaq commented Sep 25, 2019

hi @skumar1122, @wakaleo
I am able to see Serenity-Cucumber execution in IntelliJ, maybe next info will be useful for you:

IntelliJ IDEA: IntelliJ IDEA 2019.2 (Community Edition)
Build #IC-192.5728.98, built on July 23, 2019
Runtime version: 11.0.3+12-b304.10 amd64
Cucumber for Java plugin: 192.5728.12
Serenity: 2.0.70
Serenity-Cucumber4: 1.0.21 (corresponds to Cucumber 4.2.0)
Platform: Windows 10, openjdk 11.0.1

First, you need to configure cucumber for java IDEA plugin as mentioned in article: https://johnfergusonsmart.com/running-cucumber-serenity-feature-files-directly-intellij/ . You also have to add next to "Program arguments":

--plugin cucumber.runtime.formatter.SerenityReporter

You also may to play with "Use classpath or module" and with "Shorten command line" options (may be different for java 8 and java 11). Also you have to enable some logging framework (I personally use slf4j + log4j2).

In result, you will be able to run cucumber features/scenarios via IDEA plugin from context click and all the logging:

image

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can't-fix We don't know how to do this at the moment
Projects
None yet
Development

No branches or pull requests

3 participants