Skip to content

No test are shown when all tests passed with forked unit tests #7710

Open
@Eccenux

Description

@Eccenux

Apache NetBeans version

Apache NetBeans 22

What happened

I have some unit tests (org.junit.jupiter.api.Test). I execute tests, but when they are all OK (all passed) the I see status which indicates no testes where execute at all:
obraz

Only when I go to Output tab I can see:

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

Language / Project Type / NetBeans Component

Java Maven Spring application

How to reproduce

  1. Create jupiter unit test file.
  2. Add testFail.
  3. Execute file: CTRL+F6.
  4. -> "4 tests passed, 1 test failed" (OK)
  5. Fix (uncomment fix).
  6. Execute file: CTRL+F6.
  7. -> "No tests executed" (bug)

Example test failing.

	@Test
	void testFail() {
		String input = "abc";
		String expected = "123";
//		// fix
//		input = expected;
		assertEquals(expected, input);
	}

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 11

JDK

17

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Java[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)Maven[ci] enable "build tools" testskind:bugBug report or fixtests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions