cucumber / docs

Cucumber user documentation
https://cucumber.io/docs/installation/
MIT License
151 stars 529 forks source link

The 10-minute-tutorial does not work as expected #737

Open FatalCatharsis opened 2 years ago

FatalCatharsis commented 2 years ago

👓 What did you see?

I was following along with the 10 minute tutorial here. Using maven, I downloaded the archtype project and then ran mvn test. The output showed nothing related to cucumber results.


[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< hellocucumber:hellocucumber >---------------------
[INFO] Building hellocucumber 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hellocucumber ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory E:\projects\tests\hellocucumber\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ hellocucumber ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ hellocucumber ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ hellocucumber ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ hellocucumber ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.116 s
[INFO] Finished at: 2022-04-05T12:50:17-05:00
[INFO] ------------------------------------------------------------------------

✅ What did you expect to see?

I expected this in the tests blocks:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running hellocucumber.RunCucumberTest
No features found at [classpath:hellocucumber]

0 Scenarios
0 Steps
0m0.004s

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.541 sec

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

📦 Which tool/library version are you using?

using maven 3.6.0 in command line and java 1.8.0-292 OpenJDK

🔬 How could we reproduce it?

Just follow the tutorial for maven.

📚 Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

FatalCatharsis commented 2 years ago

Note I do get normal junit test failures if I define an unimplemented feature in the src/resources/hellocucumber folder, but never recieve that report that is listed in the tutorial.

mpkorstanje commented 2 years ago

That's odd.

mpkorstanje commented 2 years ago

Ah. Not this is expected. The tutorial was written using JUnit 4 and is now using JUnit 5.

mpkorstanje commented 2 years ago

I would suggest updating the 10 minute tutorial and cucumber version:

bodiam commented 2 years ago

I think the 10 minute tutorial is quite broken, in the way that it doesn't load the code examples anymore.

I'm getting an error:

Uncaught TypeError: el is null
    addClass https://cucumber.io/js/site.js:17
    showOnly https://cucumber.io/js/site.js:73
    <anonymous> https://cucumber.io/js/site.js:140

This makes it very hard to figure out what to do.

aurelien-reeves commented 2 years ago

@bodiam I cannot reproduce your issue Could you be more specific? Did you tried hard-refreshing the page (using Ctrl+R for example)?

bodiam commented 2 years ago

@aurelien-reeves apologies, I should have included some screenshots:

image image image

I've tried this on both Chrome, Firefox and Safari on 2 different Macs, and I see no code examples at all, while the markdown file clearly has different code for each programming language.

aurelien-reeves commented 2 years ago

I still cannot reproduce your issue.

In your screenshot of your developer console, we can see that some content has been blocked. You may want to check your addons and configuratin to make sure you are not blocking some content from being downloaded.

I notice also a "SameSite" issue. What is the full URL you are using?

bodiam commented 2 years ago
image

This is the full URL I'm using: https://cucumber.io/docs/guides/10-minute-tutorial/. No content blockers, no addons, just plain Chrome

Could try reloading the page on your end? Maybe you have something cached which makes the page work?

aurelien-reeves commented 2 years ago

I did reload the page without reproducing the issue

However I have been able to reproduce it in incognito mode.

aurelien-reeves commented 2 years ago

@bodiam it should be fixed now. You just have to refresh the page.

Could you please confirm?

bodiam commented 2 years ago
image

Success! Well done for fixing it, thanks!

aurelien-reeves commented 2 years ago

@FatalCatharsis @mpkorstanje has the initial issue been fixed? If so, could we close that ticket?

epragtbeamtree commented 2 years ago

@aurelien-reeves I don't think so, the 10 minute tutorial is still quite a bit out of date. I'm using it right now to setup a Kotlin/Gradle project, I'm happy to send a PR when I'm done with some updated documentation, such as the version numbers.

aurelien-reeves commented 2 years ago

Ok, thanks for the info

mpkorstanje commented 2 years ago

Unfortunately because of the latest JUnit 5 upgrade I've had to update the archetype to include a working test. This will change the output a bit. This change should be released with Cucumber 7.5.0 and hopefully that will happen soonish.

https://github.com/cucumber/cucumber-jvm/pull/2590/files#diff-fa15bb75742d5701f909d046a514dbd9b99e704ffa5424c8a5228d910db91fcc

epragtbeamtree commented 2 years ago

I'm still happy to update the documentation, both for Maven and for Gradle. I'll try to do it before the release of Cucumber 7.5.0.

mpkorstanje commented 2 years ago

Please feel free. v7.5.0 has been released.

luke-hill commented 1 day ago

Hi @epragtbeamtree - Did you get around to this?

bodiam commented 1 day ago

@luke-hill no, I never got around to doing this.