docs icon indicating copy to clipboard operation
docs copied to clipboard

The 10-minute-tutorial does not work as expected

Open FatalCatharsis opened this issue 2 years ago • 18 comments

👓 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 avatar Apr 05 '22 18:04 FatalCatharsis

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.

FatalCatharsis avatar Apr 05 '22 18:04 FatalCatharsis

That's odd.

mpkorstanje avatar Apr 06 '22 11:04 mpkorstanje

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

mpkorstanje avatar Apr 10 '22 13:04 mpkorstanje

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

  • https://github.com/cucumber/docs/blob/main/content/docs/guides/10-minute-tutorial.md
  • https://github.com/cucumber/docs/blob/main/data/versions.yaml

mpkorstanje avatar Apr 10 '22 13:04 mpkorstanje

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.

bodiam avatar Jul 04 '22 12:07 bodiam

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

aurelien-reeves avatar Jul 04 '22 12:07 aurelien-reeves

@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.

bodiam avatar Jul 04 '22 13:07 bodiam

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?

aurelien-reeves avatar Jul 04 '22 14:07 aurelien-reeves

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?

bodiam avatar Jul 04 '22 15:07 bodiam

I did reload the page without reproducing the issue

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

aurelien-reeves avatar Jul 04 '22 15:07 aurelien-reeves

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

Could you please confirm?

aurelien-reeves avatar Jul 04 '22 15:07 aurelien-reeves

image

Success! Well done for fixing it, thanks!

bodiam avatar Jul 04 '22 16:07 bodiam

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

aurelien-reeves avatar Jul 05 '22 07:07 aurelien-reeves

@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.

epragtbeamtree avatar Jul 05 '22 08:07 epragtbeamtree

Ok, thanks for the info

aurelien-reeves avatar Jul 05 '22 08:07 aurelien-reeves

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

mpkorstanje avatar Jul 27 '22 01:07 mpkorstanje

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.

epragtbeamtree avatar Jul 27 '22 02:07 epragtbeamtree

Please feel free. v7.5.0 has been released.

mpkorstanje avatar Jul 31 '22 15:07 mpkorstanje