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

Micronaut tests are skipped #1732

Open
ChrisVesters opened this issue Sep 17, 2024 · 12 comments
Open

Micronaut tests are skipped #1732

ChrisVesters opened this issue Sep 17, 2024 · 12 comments

Comments

@ChrisVesters
Copy link

ChrisVesters commented Sep 17, 2024

  1. Unzip the zip and try to run the default application test in VSCode.
  2. See that they are skipped.
%TSTTREE2,com.example.DemoTest,true,1,false,1,DemoTest,,[engine:junit-jupiter]/[class:com.example.DemoTest]
%TSTTREE3,testItWorks(com.example.DemoTest),false,1,false,2,testItWorks(),,[engine:junit-jupiter]/[class:com.example.DemoTest]/[method:testItWorks()]
%TESTS  3,@Ignore: testItWorks(com.example.DemoTest)
%TESTE  3,@Ignore: testItWorks(com.example.DemoTest)
  1. Comment out the line id("io.micronaut.test-resources") version "4.4.2" in build.gradle.
  2. Run the tests again, and now they work.

demo.zip

@jdneo
Copy link
Member

jdneo commented Sep 18, 2024

The attached project has compilation errors

image

Anyway, I comment out RunCucumberTest.java and StepDefinitions.java, and using gradle delegation feature, looks like it works as expected.

image

image

@ChrisVesters
Copy link
Author

I don't think you are looking at the right project.
The one I uploaded doesn't contain any Cucumber tests.

It only contains a single DemoTest file.

@jdneo
Copy link
Member

jdneo commented Sep 18, 2024

Have you tried Delegate Test to Gradle mentioned above?

@ChrisVesters
Copy link
Author

ChrisVesters commented Sep 18, 2024

I don't seem to have the option to run it with a certain profile.

Update: turns out I didn't have the extension enabled.
So I can run it now like that, but it doesn't seem to do anything.

@jdneo
Copy link
Member

jdneo commented Sep 18, 2024

but it doesn't seem to do anything.

Could you explain more about what happened on your side?

@ChrisVesters
Copy link
Author

As I say. I don't see any output.
Not in the test tab, not in the debug tab, nothing.
The test tab only shows this: * The test run did not record any output.

If i run it on the command line with gradle it does run the test successfully.

 ./gradlew test

BUILD SUCCESSFUL in 8s

@jdneo
Copy link
Member

jdneo commented Sep 19, 2024

Not in the test tab, not in the debug tab, nothing.

It's a limitation right now from upstream: microsoft/build-server-for-gradle#119 (comment)

Can you see the green mark after running in the gutter?

@ChrisVesters
Copy link
Author

ChrisVesters commented Sep 19, 2024

I don't see the green mark.
I also don't seen an update about the tests in the testing panel.

Screenshot 2024-09-19 at 09 24 44

On the image above I had previous runs directly through VSCode (also tried with coverage and such)
I cleared the previous runs and tried do always delegate to Gradle

Screenshot 2024-09-19 at 09 25 34

@jdneo
Copy link
Member

jdneo commented Sep 19, 2024

I cannot repro, here is what I've seen for this project.

micronaut.mp4

@ChrisVesters
Copy link
Author

Interesting.
I just tried to disable all extensions except for Gradle and Java test runner, but I still have the same issue?
You think it could be related to the platorm/machine?

I am using Mac.

@jdneo
Copy link
Member

jdneo commented Sep 19, 2024

You think it could be related to the platorm/machine?

No I don't think so.

What are the enabled extensions and their versions on your side?

@ChrisVesters
Copy link
Author

I tried to disable as much extensions as I could.

Still active extensions are:

  • Debugger for Java: v0.58.0
  • Gradle for Java: v3.16.4
  • Language Support for Java by Red Hat: v1.34.0
  • Test Runner for Java: v0.42.0
  • Windows Default Keybindings: v0.0.10
Screenshot 2024-09-19 at 12 10 02

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

No branches or pull requests

2 participants